summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbar.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/gtktoolbar.c
parentade171a2ed1f868b13dd1f1cb221e6622b92e052 (diff)
downloadgtk+-359d874ddbbc193fd0490fcfe18e96bc1b89619b.tar.gz
Use g_clear_pointer to unparent widgets
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r--gtk/gtktoolbar.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 3e1a1ee3c9..dbf53dd9cd 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -2596,11 +2596,7 @@ gtk_toolbar_dispose (GObject *object)
GtkToolbar *toolbar = GTK_TOOLBAR (object);
GtkToolbarPrivate *priv = toolbar->priv;
- if (priv->arrow_button)
- {
- gtk_widget_unparent (priv->arrow_button);
- priv->arrow_button = NULL;
- }
+ g_clear_pointer (&priv->arrow_button, gtk_widget_unparent);
if (priv->menu)
{