[gtk+/gtk-3-18] tool item group: Don't leak a button
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] tool item group: Don't leak a button
- Date: Mon, 9 Nov 2015 13:52:25 +0000 (UTC)
commit c9b69f7c3906b8b48f7eb2daae0c7958f9b44778
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 27 11:07:53 2015 -0400
tool item group: Don't leak a button
This causes a hickup in the new css node machinery, causing
the default-value test to fail.
gtk/gtktoolitemgroup.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c
index 719ccff..1b734b5 100644
--- a/gtk/gtktoolitemgroup.c
+++ b/gtk/gtktoolitemgroup.c
@@ -495,11 +495,7 @@ gtk_tool_item_group_finalize (GObject *object)
{
GtkToolItemGroup *group = GTK_TOOL_ITEM_GROUP (object);
- if (group->priv->children)
- {
- g_list_free (group->priv->children);
- group->priv->children = NULL;
- }
+ g_list_free (group->priv->children);
G_OBJECT_CLASS (gtk_tool_item_group_parent_class)->finalize (object);
}
@@ -527,6 +523,9 @@ gtk_tool_item_group_dispose (GObject *object)
}
g_clear_object (&priv->settings);
+ if (priv->header)
+ gtk_widget_destroy (priv->header);
+ g_clear_object (&priv->header);
G_OBJECT_CLASS (gtk_tool_item_group_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]