summaryrefslogtreecommitdiffstats
path: root/main/nautilus/005-gbus-assertion.patch
blob: 44979d431183924aa55e40ed5af808b05508ad79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 9142d259dcaa6b011604cbd560b94ce31d314b88 Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
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