From 95dba930461abc8defa006bb1d1757af95aefdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 30 Jun 2017 00:06:53 +0200 Subject: [PATCH] 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 --- src/st/st-private.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/st/st-private.c b/src/st/st-private.c index b00a2bdd7..0db257aa2 100644 --- a/src/st/st-private.c +++ b/src/st/st-private.c @@ -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 {