Do not try to unref NULL CoglObjects

https://bugzilla.gnome.org/show_bug.cgi?id=765058
This commit is contained in:
Florian Müllner 2016-04-14 16:21:35 +02:00
parent 588b8a163b
commit bdc72dd9d7
2 changed files with 4 additions and 3 deletions

View File

@ -159,6 +159,8 @@ meta_cursor_sprite_load_from_xcursor_image (MetaCursorSprite *self,
NULL); NULL);
meta_cursor_sprite_set_texture (self, texture, meta_cursor_sprite_set_texture (self, texture,
xc_image->xhot, xc_image->yhot); xc_image->xhot, xc_image->yhot);
if (texture)
cogl_object_unref (texture); cogl_object_unref (texture);
meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image); meta_cursor_renderer_realize_cursor_from_xcursor (renderer, self, xc_image);

View File

@ -102,8 +102,7 @@ detach_pixmap (MetaSurfaceActorX11 *self)
priv->pixmap = None; priv->pixmap = None;
meta_error_trap_pop (display); meta_error_trap_pop (display);
cogl_object_unref (priv->texture); g_clear_pointer (&priv->texture, cogl_object_unref);
priv->texture = NULL;
} }
static void static void