diff --git a/src/cairo-polygon-intersect.c b/src/cairo-polygon-intersect.c index 2cd73d2..1bd2646 100644 --- a/src/cairo-polygon-intersect.c +++ b/src/cairo-polygon-intersect.c @@ -1231,6 +1231,8 @@ active_edges (cairo_bo_edge_t *left, } while (1); right = left->next; + if (! right) + return; do { if unlikely ((right->deferred.other)) edges_end (right, top, polygon); @@ -1243,6 +1245,8 @@ active_edges (cairo_bo_edge_t *left, } right = right->next; + if (! right) + return; } while (1); edges_start_or_continue (left, right, top, polygon);