From f7f63ae3eede9c2e6aa6dd12307ee4972d44abb4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 2 May 2013 08:21:42 -0400 Subject: [PATCH] Revert "Remove a superfluous ref" This reverts commit f326c0eac806b037c7100309887ffc5f9193070d. Grr, turns out that cancelling is not that reliable :-( --- gtk/gtkplacessidebar.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 35a758d88e..9b08485df0 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -2205,7 +2205,8 @@ mount_volume (GtkPlacesSidebar *sidebar, GVolume *volume) mount_op = gtk_mount_operation_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (sidebar)))); g_mount_operation_set_password_save (mount_op, G_PASSWORD_SAVE_FOR_SESSION); - g_volume_mount (volume, 0, mount_op, NULL, volume_mount_cb, g_object_ref (sidebar)); + g_object_ref (sidebar); + g_volume_mount (volume, 0, mount_op, NULL, volume_mount_cb, sidebar); } static void @@ -3571,6 +3572,8 @@ hostname_proxy_new_cb (GObject *source_object, sidebar->hostnamed_proxy = g_dbus_proxy_new_for_bus_finish (res, &error); g_clear_object (&sidebar->hostnamed_cancellable); + g_object_unref (sidebar); + if (error != NULL) { g_debug ("Failed to create D-Bus proxy: %s", error->message); g_error_free (error); @@ -3830,7 +3833,7 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar) "org.freedesktop.hostname1", sidebar->hostnamed_cancellable, hostname_proxy_new_cb, - sidebar); + g_object_ref (sidebar)); sidebar->drop_state = DROP_STATE_NORMAL; sidebar->new_bookmark_index = -1;