st: Don't try to create shadow for empty texture
Even though the API documentation doesn't say so, the underlying Cogl texture of a ClutterTexture may be unset, so check for that case to avoid a runtime warning. https://bugzilla.gnome.org/show_bug.cgi?id=784353
This commit is contained in:
parent
35eddb3dfa
commit
95dba93046
@ -420,7 +420,8 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec,
|
|||||||
CoglTexture *texture;
|
CoglTexture *texture;
|
||||||
|
|
||||||
texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (actor));
|
texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (actor));
|
||||||
shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture);
|
if (texture)
|
||||||
|
shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user