[PATCH] gl: release context if creating image failed
Yuanhan Liu <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
Release gl context if the former image creating failed. Also let it return the right status value from image->status Signed-off-by: Yuanhan Liu <[email protected]> --- src/cairo-gl-operand.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/cairo-gl-operand.c b/src/cairo-gl-operand.c index 1368a86..bb341ab 100644 --- a/src/cairo-gl-operand.c +++ b/src/cairo-gl-operand.c @@ -589,7 +589,9 @@ _cairo_gl_pattern_texture_setup (cairo_gl_operand_t *operand, extents->height, -1); if (unlikely (image->status)) { + cairo_int_status_t ignore = _cairo_gl_context_release(ctx, status); cairo_surface_destroy (image); + status = image->status; goto fail; } -- 1.7.7.6 -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo