summaryrefslogtreecommitdiff
path: root/gtk/gtkswitch.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-01-07 15:58:55 +0100
committerTimm Bäder <mail@baedert.org>2017-01-07 17:19:30 +0100
commitf486805ba094751bb842aa60237448fdc2311f2b (patch)
tree4e1fb750be3cb7b4408dc371f15f9f24920ec120 /gtk/gtkswitch.c
parent5f98597a0c3878801c12e630755be327263064e2 (diff)
downloadgtk+-f486805ba094751bb842aa60237448fdc2311f2b.tar.gz
Unparent child widgets
Diffstat (limited to 'gtk/gtkswitch.c')
-rw-r--r--gtk/gtkswitch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 4428f99de8..3632793664 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -679,8 +679,13 @@ gtk_switch_dispose (GObject *object)
static void
gtk_switch_finalize (GObject *object)
{
+ GtkSwitchPrivate *priv = GTK_SWITCH (object)->priv;
+
gtk_switch_end_toggle_animation (GTK_SWITCH (object));
+ gtk_widget_unparent (priv->on_label);
+ gtk_widget_unparent (priv->off_label);
+
G_OBJECT_CLASS (gtk_switch_parent_class)->finalize (object);
}