mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-13 22:10:39 +01:00
gl: Only unref a surface if it exists
Note: This will likely work for NULL clones, but I prefer not dereferencing NULLs. That gives people a wrong understanding of the code (i.e. me).
This commit is contained in:
parent
64662be4ef
commit
3efbc0c5c8
1 changed files with 2 additions and 1 deletions
|
|
@ -881,7 +881,8 @@ fail:
|
|||
|
||||
_cairo_gl_context_release (ctx);
|
||||
|
||||
cairo_surface_destroy (&clone->base);
|
||||
if (clone)
|
||||
cairo_surface_destroy (&clone->base);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue