st/scroll-view: Remove scrollbars references on dispose

As we're destroying the scrollbars on destruction, we should remove any
reference of it, not to cause multiple-calls to disposal to unreference them
again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/190
This commit is contained in:
Marco Trevisan (Treviño) 2018-08-03 19:06:47 +02:00
parent 4dc44304df
commit aa9031d8e7

View File

@ -250,11 +250,8 @@ st_scroll_view_dispose (GObject *object)
priv->fade_effect = NULL; priv->fade_effect = NULL;
} }
if (priv->vscroll) g_clear_pointer (&priv->vscroll, clutter_actor_destroy);
clutter_actor_destroy (priv->vscroll); g_clear_pointer (&priv->hscroll, clutter_actor_destroy);
if (priv->hscroll)
clutter_actor_destroy (priv->hscroll);
/* For most reliable freeing of memory, an object with signals /* For most reliable freeing of memory, an object with signals
* like StAdjustment should be explicitly disposed. Since we own * like StAdjustment should be explicitly disposed. Since we own