mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-07 02:48:20 +02:00
_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:
parent
74e7f3b441
commit
6fb4c3ae35
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue