[gnome-shell] st/scroll-view: Remove scrollbars references on dispose
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st/scroll-view: Remove scrollbars references on dispose
- Date: Wed, 30 Oct 2019 00:14:50 +0000 (UTC)
commit aa9031d8e7692e41b442534a2e473ef4f2f67f14
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Fri Aug 3 19:06:47 2018 +0200
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
src/st/st-scroll-view.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/st/st-scroll-view.c b/src/st/st-scroll-view.c
index 029e4a356d..79af3ca13a 100644
--- a/src/st/st-scroll-view.c
+++ b/src/st/st-scroll-view.c
@@ -250,11 +250,8 @@ st_scroll_view_dispose (GObject *object)
priv->fade_effect = NULL;
}
- if (priv->vscroll)
- clutter_actor_destroy (priv->vscroll);
-
- if (priv->hscroll)
- clutter_actor_destroy (priv->hscroll);
+ g_clear_pointer (&priv->vscroll, clutter_actor_destroy);
+ g_clear_pointer (&priv->hscroll, clutter_actor_destroy);
/* For most reliable freeing of memory, an object with signals
* like StAdjustment should be explicitly disposed. Since we own
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]