summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortarakbumba <[email protected]>2015-04-07 00:16:35 +0300
committertarakbumba <[email protected]>2015-04-07 00:16:35 +0300
commitb9f3254b87c9a20dd75238694a8e93ba8020792a (patch)
tree828b6ea9eecc43eaa8c1e666da4791055b0ced60
parentadc45ec84298f6246d9ed219607bb5c169f50e08 (diff)
downloadcaja-b9f3254b87c9a20dd75238694a8e93ba8020792a.tar.bz2
caja-b9f3254b87c9a20dd75238694a8e93ba8020792a.tar.xz
Fix g_bus_unwatch_name assertion
Guard the g_bus_unwatch_name() call to only run when we actually have set a watcher to the screensaver.
-rw-r--r--src/caja-application.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index 1eb2a7cb..e4d2d973 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -363,9 +363,13 @@ caja_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) {
+ if (application->volume_queue != NULL)
+ {
g_list_free_full (application->volume_queue, g_object_unref);
application->volume_queue = NULL;
}