summaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2011-06-13 17:20:34 +0100
committerTravis Reitter <travis.reitter@collabora.co.uk>2011-06-23 09:34:17 -0700
commit2d042c289bcc140f402c20603c12e57339815cf4 (patch)
treea9d0ce0a4f53376a3d5072409a7d9ccb2b8cbda3 /backends
parent89a975951e2e52597c4193a9aafe27356588fff2 (diff)
Bug 652472 — Handle failure in getting the logger service better
If we fail to get the logger from the bus, get_object() may return NULL. If we check for this, we don't then try and connect a signal to a NULL object instance and emit criticals. Closes: bgo#652472
Diffstat (limited to 'backends')
-rw-r--r--backends/telepathy/lib/tpf-logger.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/telepathy/lib/tpf-logger.vala b/backends/telepathy/lib/tpf-logger.vala
index b130626..e930638 100644
--- a/backends/telepathy/lib/tpf-logger.vala
+++ b/backends/telepathy/lib/tpf-logger.vala
@@ -74,6 +74,13 @@ internal class Logger : GLib.Object
"/org/freedesktop/Telepathy/Logger",
"org.freedesktop.Telepathy.Logger.DRAFT") as LoggerIface;
+ /* Failure? */
+ if (this._logger == null)
+ {
+ this.invalidated ();
+ return retval;
+ }
+
this._logger.destroy.connect (() =>
{
/* We've lost the connection to the logger service, so invalidate