diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-07-30 10:54:07 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-07-30 10:54:07 +0200 |
commit | c13324311137a01286d1712ac8a33644f294c1ad (patch) | |
tree | b7362d8415636b6878730b09d88c40f50e3a6d0a /src/cairo-clip.c | |
parent | 6155348966b89a216d2e5ee0b4784507a0226a9f (diff) | |
download | cairo-c13324311137a01286d1712ac8a33644f294c1ad.tar.gz |
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.
Diffstat (limited to 'src/cairo-clip.c')
-rw-r--r-- | src/cairo-clip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c index 4058879fd..6355a977b 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -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); |