Check for failure when intersecting regions.
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Mar 2009 13:28:31 +0000 (13:28 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Mar 2009 13:28:31 +0000 (13:28 +0000)
Need to check and report the failure of intersecting the rectangle with
the clip region during pixman_image_fill_rectangles().

pixman/pixman-image.c

index e80c479..8b56ac2 100644 (file)
@@ -703,7 +703,11 @@ pixman_image_fill_rectangles (pixman_op_t              op,
                pixman_box32_t *boxes;
 
                pixman_region32_init_rect (&fill_region, rects[i].x, rects[i].y, rects[i].width, rects[i].height);
-               pixman_region32_intersect (&fill_region, &fill_region, &dest->common.clip_region);
+               if (!pixman_region32_intersect (&fill_region,
+                                               &fill_region,
+                                               &dest->common.clip_region))
+                   return FALSE;
+
 
                boxes = pixman_region32_rectangles (&fill_region, &n_boxes);
                for (j = 0; j < n_boxes; ++j)