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
This commit is contained in:
Mario Sanchez Prada 2018-02-09 11:50:08 +00:00
parent fc5b1591ad
commit cc028dd55a

View File

@ -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;