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:
Florian Müllner 2017-06-30 00:06:53 +02:00
parent 292ac413c8
commit d1c71fd00d

View File

@ -420,7 +420,8 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec,
CoglTexture *texture;
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
{