]> granicus.if.org Git - poly2tri-c/commitdiff
Fixed a wrong behavior of the cluster finding function
authorBarak Itkin <lightningismyname@gmail.com>
Sat, 30 Jun 2012 12:50:27 +0000 (15:50 +0300)
committerBarak Itkin <lightningismyname@gmail.com>
Sat, 30 Jun 2012 12:50:27 +0000 (15:50 +0300)
poly2tri-c/refine/cluster.c

index 12fe25d7af2e80aca7eb185a60cbafb53b3a198f..95db9ec26397a8e94ae17d31e2dcd9909793fcce 100644 (file)
@@ -75,7 +75,10 @@ p2tr_cluster_get_for (P2trPoint   *P,
   g_queue_init (&cluster->edges);
 
   if (P == E->end)
-    P = P2TR_EDGE_START (E);
+    {
+      E = p2tr_edge_ref (E->mirror);
+      p2tr_edge_unref (E->mirror);
+    }
   else if (P != P2TR_EDGE_START (E))
     p2tr_exception_programmatic ("Unexpected point for the edge!");