[cairo-commit] src/cairo-image-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Thu May 6 01:31:43 PDT 2010


 src/cairo-image-surface.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit fb6caf08ae5ccf8f8c2c251d32fd98aacbcebdcc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu May 6 09:30:41 2010 +0100

    image: Propagate error instead of asserting.
    
    Apparently we can get to this point without evaluating the clip surface,
    so return the error status rather than assert.

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 04a907c..92b30ef 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -1632,7 +1632,8 @@ _cairo_image_surface_fixup_unbounded (cairo_image_surface_t *dst,
 	int clip_x, clip_y;
 
 	clip_surface = _cairo_clip_get_surface (clip, &dst->base, &clip_x, &clip_y);
-	assert (clip_surface->status == CAIRO_STATUS_SUCCESS);
+	if (unlikely (clip_surface->status))
+	    return clip_surface->status;
 
 	mask = ((cairo_image_surface_t *) clip_surface)->pixman_image;
 	mask_x = -clip_x;


More information about the cairo-commit mailing list