summaryrefslogtreecommitdiff
path: root/gtk/gtkscrollbar.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-11-13 20:53:14 +0100
committerTimm Bäder <mail@baedert.org>2018-11-13 20:53:14 +0100
commit359d874ddbbc193fd0490fcfe18e96bc1b89619b (patch)
tree6609af8091a20bb4ed045b4c1e8b5a7aceae94f9 /gtk/gtkscrollbar.c
parentade171a2ed1f868b13dd1f1cb221e6622b92e052 (diff)
downloadgtk+-359d874ddbbc193fd0490fcfe18e96bc1b89619b.tar.gz
Use g_clear_pointer to unparent widgets
Diffstat (limited to 'gtk/gtkscrollbar.c')
-rw-r--r--gtk/gtkscrollbar.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c
index 3c4be33b7a..64d81769cf 100644
--- a/gtk/gtkscrollbar.c
+++ b/gtk/gtkscrollbar.c
@@ -200,11 +200,7 @@ gtk_scrollbar_dispose (GObject *object)
GtkScrollbar *self = GTK_SCROLLBAR (object);
GtkScrollbarPrivate *priv = gtk_scrollbar_get_instance_private (self);
- if (priv->box)
- {
- gtk_widget_unparent (priv->box);
- priv->box = NULL;
- }
+ g_clear_pointer (&priv->box, gtk_widget_unparent);
G_OBJECT_CLASS (gtk_scrollbar_parent_class)->dispose (object);
}