_cairo_clip_get_surface(): Don't lose errors

If one of the _cairo_surface_fill() calls failed, this function would stop and
return an intermediate result, thus hiding the error that happened.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2011-09-16 18:16:01 +02:00
parent 74e7f3b441
commit 6fb4c3ae35

View file

@ -130,6 +130,11 @@ _cairo_clip_get_surface (const cairo_clip_t *clip,
copy->path = copy_path;
_cairo_clip_destroy (copy);
if (unlikely (status)) {
cairo_surface_destroy (surface);
return _cairo_surface_create_in_error (status);
}
*tx = clip->extents.x;
*ty = clip->extents.y;
return surface;