mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 21:08:10 +02:00
clipper: Fix crashes
The end of the clip path list is marked with NULL, so we should stop iterating paths when we reach it. The assertion was meant to check if paths had the same content, not if they have the same address. Fixes clip-fill-rule and clip-twice in cairo-quartz.
This commit is contained in:
parent
9ef003c5fc
commit
588e5a24fa
1 changed files with 1 additions and 2 deletions
|
|
@ -142,11 +142,10 @@ _cairo_surface_clipper_set_clip (cairo_surface_clipper_t *clipper,
|
|||
sizeof (cairo_box_t) * clip->num_boxes) == 0)
|
||||
{
|
||||
cairo_clip_path_t *clip_path = clip->path;
|
||||
while (clip_path != clipper->clip->path)
|
||||
while (clip_path != NULL && clip_path != clipper->clip->path)
|
||||
clip_path = clip_path->prev;
|
||||
|
||||
if (clip_path) {
|
||||
assert (clip_path != clipper->clip->path);
|
||||
incremental = TRUE;
|
||||
status = _cairo_surface_clipper_intersect_clip_path_recursive (clipper,
|
||||
clip->path,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue