mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 01:58:04 +02:00
clip: Fix copy of clip rectangles list
_cairo_clip_get_region() returns NULL both for non-region clips and for memory allocaiton failures. They must be distinguished by checking _cairo_clip_is_region(). Fixes get-clip.
This commit is contained in:
parent
6155348966
commit
c133243111
1 changed files with 3 additions and 0 deletions
|
|
@ -639,6 +639,9 @@ _cairo_clip_copy_rectangle_list (cairo_clip_t *clip, cairo_gstate_t *gstate)
|
|||
if (_cairo_clip_is_all_clipped (clip))
|
||||
goto DONE;
|
||||
|
||||
if (! _cairo_clip_is_region (clip))
|
||||
return ERROR_LIST (CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
|
||||
|
||||
region = _cairo_clip_get_region (clip);
|
||||
if (region == NULL)
|
||||
return ERROR_LIST (CAIRO_STATUS_NO_MEMORY);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue