From 445cbdf2d7f4cd153e0a8f5aa3c1db3a9993e188 Mon Sep 17 00:00:00 2001 From: Barak Itkin Date: Sat, 30 Jun 2012 15:50:27 +0300 Subject: [PATCH] Fixed a wrong behavior of the cluster finding function --- poly2tri-c/refine/cluster.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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!"); -- 2.50.1