st: Do not try to unref NULL CoglObjects
https://bugzilla.gnome.org/show_bug.cgi?id=765061
This commit is contained in:
parent
045e1f01af
commit
281101d942
@ -395,7 +395,10 @@ _st_create_shadow_pipeline (StShadow *shadow_spec,
|
|||||||
|
|
||||||
pipeline = cogl_pipeline_copy (shadow_pipeline_template);
|
pipeline = cogl_pipeline_copy (shadow_pipeline_template);
|
||||||
cogl_pipeline_set_layer_texture (pipeline, 0, texture);
|
cogl_pipeline_set_layer_texture (pipeline, 0, texture);
|
||||||
cogl_object_unref (texture);
|
|
||||||
|
if (texture)
|
||||||
|
cogl_object_unref (texture);
|
||||||
|
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -648,8 +648,12 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
|
|||||||
cairo_image_surface_get_stride (surface),
|
cairo_image_surface_get_stride (surface),
|
||||||
cairo_image_surface_get_data (surface),
|
cairo_image_surface_get_data (surface),
|
||||||
NULL));
|
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);
|
clutter_actor_set_opacity (CLUTTER_ACTOR (bind->texture), 255);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user