From c8c6d77c3584c306de4d00a526df488d87e4c027 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 24 Aug 2009 17:30:41 +0200 Subject: [PATCH] Fix finalize() so it doesn't crash --- app/core/gimpgrouplayer.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c index 6e1d5e3111..e879f87930 100644 --- a/app/core/gimpgrouplayer.c +++ b/app/core/gimpgrouplayer.c @@ -227,12 +227,6 @@ gimp_group_layer_finalize (GObject *object) { GimpGroupLayer *group = GIMP_GROUP_LAYER (object); - if (group->projection) - { - g_object_unref (group->projection); - group->projection = NULL; - } - if (group->children) { g_signal_handlers_disconnect_by_func (group->children, @@ -241,11 +235,20 @@ gimp_group_layer_finalize (GObject *object) g_signal_handlers_disconnect_by_func (group->children, gimp_group_layer_child_remove, group); + g_signal_handlers_disconnect_by_func (group->children, + gimp_group_layer_stack_update, + group); g_object_unref (group->children); group->children = NULL; } + if (group->projection) + { + g_object_unref (group->projection); + group->projection = NULL; + } + G_OBJECT_CLASS (parent_class)->finalize (object); }