summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/17-active-edges-crash.patch
blob: 809d07df6575680a6164f80ebbbc8d5f2096554f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/gfx/cairo/cairo/src/cairo-polygon-intersect.c b/gfx/cairo/cairo/src/cairo-polygon-intersect.c
--- a/gfx/cairo/cairo/src/cairo-polygon-intersect.c
+++ b/gfx/cairo/cairo/src/cairo-polygon-intersect.c
@@ -1167,7 +1167,7 @@ active_edges (cairo_bo_edge_t		*left,
 	    } while (1);
 
 	    right = left->next;
-	    do {
+	    while (right) {
 		if unlikely ((right->deferred.other))
 		    edges_end (right, top, polygon);
 
@@ -1179,7 +1179,9 @@ active_edges (cairo_bo_edge_t		*left,
 		}
 
 		right = right->next;
-	    } while (1);
+	    };
+	    if (! right)
+		return;
 
 	    edges_start_or_continue (left, right, top, polygon);