From cc028dd55abc45980c89a9970d5753c1c8c682da Mon Sep 17 00:00:00 2001 From: Mario Sanchez Prada Date: Fri, 9 Feb 2018 11:50:08 +0000 Subject: [PATCH] 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;