From 9142d259dcaa6b011604cbd560b94ce31d314b88 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 15 Mar 2011 13:59:27 +0000 Subject: Fix g_bus_unwatch_name assertion Commit b7262fa9 caused GLib-GIO-CRITICAL **: g_bus_unwatch_name: assertion `watcher_id > 0' failed when starting nautilus while it's already running. Guard the g_bus_unwatch_name() call to only run when we actually have set a watcher to the screensaver. https://launchpad.net/bugs/724285 --- diff --git a/src/nautilus-application.c b/src/nautilus-application.c index dfeaea6..ab6ca0d 100644 --- a/src/nautilus-application.c +++ b/src/nautilus-application.c @@ -350,7 +350,9 @@ nautilus_application_finalize (GObject *object) g_object_unref (application->unique_app); - g_bus_unwatch_name (application->ss_watch_id); + if (application->ss_watch_id > 0) { + g_bus_unwatch_name (application->ss_watch_id); + } if (application->volume_queue != NULL) { g_list_free_full (application->volume_queue, g_object_unref); -- cgit v0.9