st: Do not try to unref NULL CoglObjects

https://bugzilla.gnome.org/show_bug.cgi?id=765061
This commit is contained in:
Florian Müllner
2016-04-14 17:18:42 +02:00
parent cf4465027a
commit 59c2ace98c
2 changed files with 10 additions and 3 deletions

View File

@@ -640,8 +640,12 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
cairo_image_surface_get_stride (surface),
cairo_image_surface_get_data (surface),
NULL));
clutter_texture_set_cogl_texture (bind->texture, texdata);
cogl_object_unref (texdata);
if (texdata)
{
clutter_texture_set_cogl_texture (bind->texture, texdata);
cogl_object_unref (texdata);
}
clutter_actor_set_opacity (CLUTTER_ACTOR (bind->texture), 255);
}