[gimp/gimp-2-8] 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/gimp-2-8] Bug 707255 - Open preferences when quitting causes assertion failure.
- Date: Thu, 5 Sep 2013 11:54:38 +0000 (UTC)
commit 175852a407871afdc50e71c2f1f2923a67d89f78
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.
(cherry picked from commit 04a3c65aa1f68c99538d86c97649ec4884822030)
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 8b4f9ca..c1d081e 100644
--- a/app/widgets/gimpcontainerview.c
+++ b/app/widgets/gimpcontainerview.c
@@ -1074,15 +1074,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);
@@ -1093,6 +1089,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);
@@ -1103,6 +1105,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]