summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2011-03-15 14:59:27 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2011-03-15 14:59:27 +0100
commit9142d259dcaa6b011604cbd560b94ce31d314b88 (patch)
treedf811ec515e7ccfa50d7d5914e2e0a00da1335ef
parent640562cdc9627eb1ab158b5fd3e722fc8dddf97c (diff)
downloadnautilus-9142d259dcaa6b011604cbd560b94ce31d314b88.tar.gz
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
-rw-r--r--src/nautilus-application.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index dfeaea6d2..ab6ca0d4f 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);