[gimp] Bug 707255 - Open preferences when quitting causes assertion failure.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 707255 - Open preferences when quitting causes assertion failure.
- Date: Thu, 5 Sep 2013 11:23:38 +0000 (UTC)
commit 04a3c65aa1f68c99538d86c97649ec4884822030
Author: Jehan <jehan girinstud io>
Date: Thu Sep 5 22:10:24 2013 +1200
Bug 707255 - Open preferences when quitting causes assertion failure.
Wrong order of destruction functions were causing critical warnings on
g_signal_handlers_disconnect_by_func() calls.
Also g_object_ref/unref() the container because the tree handler might
hold the last ref to the container, once it's disconnected the container
could be gone.
app/widgets/gimpcontainerview.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpcontainerview.c b/app/widgets/gimpcontainerview.c
index 737284f..8958fb5 100644
--- a/app/widgets/gimpcontainerview.c
+++ b/app/widgets/gimpcontainerview.c
@@ -1075,15 +1075,11 @@ gimp_container_view_remove_container (GimpContainerView *view,
GimpContainerViewInterface *view_iface;
GimpContainerViewPrivate *private;
+ g_object_ref (container);
+
view_iface = GIMP_CONTAINER_VIEW_GET_INTERFACE (view);
private = GIMP_CONTAINER_VIEW_GET_PRIVATE (view);
- if (container == private->container)
- {
- gimp_tree_handler_disconnect (private->name_changed_handler);
- private->name_changed_handler = NULL;
- }
-
g_signal_handlers_disconnect_by_func (container,
gimp_container_view_add,
view);
@@ -1094,6 +1090,12 @@ gimp_container_view_remove_container (GimpContainerView *view,
gimp_container_view_reorder,
view);
+ if (container == private->container)
+ {
+ gimp_tree_handler_disconnect (private->name_changed_handler);
+ private->name_changed_handler = NULL;
+ }
+
if (! view_iface->model_is_tree && container == private->container)
{
gimp_container_view_clear_items (view);
@@ -1104,6 +1106,8 @@ gimp_container_view_remove_container (GimpContainerView *view,
(GFunc) gimp_container_view_remove_foreach,
view);
}
+
+ g_object_unref (container);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]