[gnome-shell/gnome-3-24] st: Don't try to create shadow for empty texture



commit 95dba930461abc8defa006bb1d1757af95aefdef
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jun 30 00:06:53 2017 +0200

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-private.c b/src/st/st-private.c
index b00a2bd..0db257a 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
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]