summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorChristian Kellner <gicmo@src.gnome.org>2008-08-03 08:31:14 +0000
committerChristian Kellner <gicmo@src.gnome.org>2008-08-03 08:31:14 +0000
commit49f930188a23fece9506b885e64c49afb0384c46 (patch)
tree8d620d8fbec3d5dfe6db906b0d8133daea73b232 /client
parent0be223b00d7229ab37c9e250f3969656d38d3457 (diff)
downloadgvfs-49f930188a23fece9506b885e64c49afb0384c46.tar.gz
Bug 543552: gvfs-fuse-daemon crashes if dbus dies
Avoid a race between the subthread and the main thread in the case of dbus going bye-bye. Bug #543552. Patch from Austin Lund <austin.lund@gmail.com> svn path=/trunk/; revision=1854
Diffstat (limited to 'client')
-rw-r--r--client/gvfsfusedaemon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index f5b0c7a4..ef3314c3 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -2037,6 +2037,7 @@ subthread_main (gpointer data)
g_signal_handlers_disconnect_by_func (volume_monitor, mount_tracker_unmounted_cb, NULL);
g_main_loop_unref (subthread_main_loop);
+ subthread_main_loop = NULL;
g_object_unref (volume_monitor);
volume_monitor = NULL;
@@ -2148,7 +2149,8 @@ static void
vfs_destroy (gpointer param)
{
mount_list_free ();
- g_main_loop_quit (subthread_main_loop);
+ if (subthread_main_loop != NULL)
+ g_main_loop_quit (subthread_main_loop);
g_mutex_free (mount_list_mutex);
g_object_unref (gvfs);
}