From: Barak Itkin Date: Sat, 30 Jun 2012 12:50:27 +0000 (+0300) Subject: Fixed a wrong behavior of the cluster finding function X-Git-Tag: p2tc-0.1.0~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=445cbdf2d7f4cd153e0a8f5aa3c1db3a9993e188;p=poly2tri-c Fixed a wrong behavior of the cluster finding function --- diff --git a/poly2tri-c/refine/cluster.c b/poly2tri-c/refine/cluster.c index 12fe25d..95db9ec 100644 --- a/poly2tri-c/refine/cluster.c +++ b/poly2tri-c/refine/cluster.c @@ -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!");