aboutsummaryrefslogtreecommitdiff
path: root/src/status-provider-telepathy.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-25 15:59:07 -0500
committerTed Gould <ted@canonical.com>2009-08-25 15:59:07 -0500
commit2ca0db49f3d75fe732885cbad2ba89c4c71beb93 (patch)
tree894c6edb20802cf5c3d8d27da9f5a1cdcecadff3 /src/status-provider-telepathy.c
parentf820b8313eb697cc96ffd4f258d1dcc82ab4f56e (diff)
downloadayatana-indicator-session-2ca0db49f3d75fe732885cbad2ba89c4c71beb93.tar.gz
ayatana-indicator-session-2ca0db49f3d75fe732885cbad2ba89c4c71beb93.tar.bz2
ayatana-indicator-session-2ca0db49f3d75fe732885cbad2ba89c4c71beb93.zip
Handling a missing session bus by displaying an error.
Diffstat (limited to 'src/status-provider-telepathy.c')
-rw-r--r--src/status-provider-telepathy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/status-provider-telepathy.c b/src/status-provider-telepathy.c
index bed962f..e22c27d 100644
--- a/src/status-provider-telepathy.c
+++ b/src/status-provider-telepathy.c
@@ -112,6 +112,11 @@ status_provider_telepathy_init (StatusProviderTelepathy *self)
GError * error = NULL;
DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+ if (session_bus == NULL) {
+ g_warning("Unable to connect to Session Bus: %s", error == NULL ? "No message" : error->message);
+ g_error_free(error);
+ return;
+ }
priv->proxy = NULL;
priv->proxy = dbus_g_proxy_new_for_name_owner(session_bus,