[gnome-shell/issue-36: 1/2] st-icon: Null-check for shadow_spec before trying to paint a shadow



commit cc028dd55abc45980c89a9970d5753c1c8c682da
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Fri Feb 9 11:50:08 2018 +0000

    st-icon: Null-check for shadow_spec before trying to paint a shadow
    
    The value of priv->shadow_spec can be NULL at the time an icon is
    going to be paint (e.g. because of a change in style), so we need
    to check it's a valid one before using it in st_icon_paint(), as
    it's already being done in other parts of the code.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/36
    
    Closes: #36

 src/st/st-icon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
index 192df60b4..fed69746a 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -164,7 +164,7 @@ st_icon_paint (ClutterActor *actor)
 
   if (priv->icon_texture)
     {
-      if (priv->shadow_pipeline)
+      if (priv->shadow_spec && priv->shadow_pipeline)
         {
           ClutterActorBox allocation;
           float width, height;


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