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:
Benjamin Otte 2010-04-20 21:58:59 +02:00
parent 64662be4ef
commit 3efbc0c5c8

View file

@ -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;
}