telepathy: Fix finalisation of Tpf.Logger if it hasn't been prepared
authorPhilip Withnall <philip@tecnocode.co.uk>
Wed, 21 Sep 2011 19:37:30 +0000 (20:37 +0100)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Thu, 10 Nov 2011 22:37:46 +0000 (14:37 -0800)
Closes: bgo#659585

NEWS
backends/telepathy/lib/tpf-logger.vala

diff --git a/NEWS b/NEWS
index b14fe55..6bce4a5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ Bugs fixed:
 * Bug 662314 — Gnome-shell restarts if I change my user status to
   disconnected/unavailable
 * Bug 663798 — Add AbstractFieldDetails.value_type
+* Bug 659585 — GLib-GIO-CRITICAL **: g_bus_unwatch_name: assertion
+  `watcher_id > 0' failed
 
 API changes:
 * Add AbstractFieldDetails.id to identify instances of details
index e249a82..a114913 100644 (file)
@@ -60,7 +60,11 @@ internal class Logger : GLib.Object
 
   ~Logger ()
     {
-      Bus.unwatch_name (this._logger_watch_id);
+      /* Can only be 0 if prepare() hasn't been called. */
+      if (this._logger_watch_id > 0)
+        {
+          Bus.unwatch_name (this._logger_watch_id);
+        }
     }
 
   public async bool prepare () throws GLib.Error