summaryrefslogtreecommitdiff
path: root/src/cairo-clip-boxes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-clip-boxes.c')
-rw-r--r--src/cairo-clip-boxes.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c
index bbb419788..352654f5f 100644
--- a/src/cairo-clip-boxes.c
+++ b/src/cairo-clip-boxes.c
@@ -173,7 +173,7 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip,
clip->extents = *r;
} else {
if (! _cairo_rectangle_intersect (&clip->extents, r))
- clip = _cairo_clip_set_all_clipped (clip);
+ return _cairo_clip_set_all_clipped (clip);
}
if (clip->path == NULL)
clip->is_region = _cairo_box_is_pixel_aligned (box);
@@ -312,10 +312,12 @@ _cairo_clip_intersect_boxes (cairo_clip_t *clip,
_cairo_boxes_extents (boxes, &limits);
_cairo_box_round_to_rectangle (&limits, &extents);
- if (clip->path == NULL)
+ if (clip->path == NULL) {
clip->extents = extents;
- else if (! _cairo_rectangle_intersect (&clip->extents, &extents))
+ } else if (! _cairo_rectangle_intersect (&clip->extents, &extents)) {
clip = _cairo_clip_set_all_clipped (clip);
+ goto out;
+ }
if (clip->region) {
cairo_region_destroy (clip->region);