[nautilus/gnome-2-32] Fix g_bus_unwatch_name assertion
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-32] Fix g_bus_unwatch_name assertion
- Date: Tue, 15 Mar 2011 14:01:41 +0000 (UTC)
commit 9142d259dcaa6b011604cbd560b94ce31d314b88
Author: Martin Pitt <martin pitt ubuntu com>
Date: Tue Mar 15 14:59:27 2011 +0100
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
src/nautilus-application.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]