mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 00:20:20 +01:00
clip: Fix clip-equal to handle one or the other being NULL/all-clipped
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
7c6e1b8db8
commit
fb9ed9bb0d
1 changed files with 10 additions and 0 deletions
|
|
@ -346,6 +346,16 @@ _cairo_clip_equal (const cairo_clip_t *clip_a,
|
|||
if (clip_a == clip_b)
|
||||
return TRUE;
|
||||
|
||||
/* or just one of them? */
|
||||
if (clip_a == NULL || clip_b == NULL ||
|
||||
_cairo_clip_is_all_clipped (clip_a) ||
|
||||
_cairo_clip_is_all_clipped (clip_b))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* We have a pair of normal clips, check their contents */
|
||||
|
||||
if (clip_a->num_boxes != clip_b->num_boxes)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue