From fb6caf08ae5ccf8f8c2c251d32fd98aacbcebdcc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 6 May 2010 09:30:41 +0100 Subject: [PATCH] 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. --- src/cairo-image-surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 04a907c1f..92b30eff7 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;