summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2011-05-01 18:52:55 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2011-05-01 23:49:23 -0400
commit01ed53f313832d7e8b6395d47022741e94820d38 (patch)
treefbc7d518d8663a24baaf1f2a45ffc85c28c84142
parenta20e16dedb851f39d9612c87dab5065ba74bff32 (diff)
downloadnautilus-01ed53f313832d7e8b6395d47022741e94820d38.tar.gz
places-sidebar: disconnect from bookmark list changed signal on dispose
This should hopefully fix this crash https://bugzilla.redhat.com/show_bug.cgi?id=699184
-rw-r--r--src/nautilus-places-sidebar.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 56216ab62..aa08f147d 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -97,6 +97,8 @@ typedef struct {
NautilusWindowOpenFlags go_to_after_mount_flags;
GtkTreePath *eject_highlight_path;
+
+ guint bookmarks_changed_id;
} NautilusPlacesSidebar;
typedef struct {
@@ -3248,6 +3250,12 @@ nautilus_places_sidebar_dispose (GObject *object)
sidebar->eject_highlight_path = NULL;
}
+ if (sidebar->bookmarks_changed_id != 0) {
+ g_signal_handler_disconnect (sidebar->bookmarks,
+ sidebar->bookmarks_changed_id);
+ sidebar->bookmarks_changed_id = 0;
+ }
+
g_clear_object (&sidebar->store);
g_clear_object (&sidebar->volume_monitor);
g_clear_object (&sidebar->bookmarks);
@@ -3291,9 +3299,10 @@ nautilus_places_sidebar_set_parent_window (NautilusPlacesSidebar *sidebar,
sidebar->bookmarks = nautilus_bookmark_list_new ();
sidebar->uri = nautilus_window_slot_get_current_uri (slot);
- g_signal_connect_object (sidebar->bookmarks, "changed",
- G_CALLBACK (update_places),
- sidebar, G_CONNECT_SWAPPED);
+ sidebar->bookmarks_changed_id =
+ g_signal_connect_swapped (sidebar->bookmarks, "changed",
+ G_CALLBACK (update_places),
+ sidebar);
g_signal_connect_object (window, "loading_uri",
G_CALLBACK (loading_uri_callback),