From 40b4288ef38837a17321d0273c26befe7c8c89b0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 23 Oct 2013 21:04:19 -0500 Subject: When we can't get a handle to the system bus, exit gracefully instead of crashing. --- libindicator/indicator-service.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libindicator') diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c index 11171fc..18c87fc 100644 --- a/libindicator/indicator-service.c +++ b/libindicator/indicator-service.c @@ -25,6 +25,8 @@ License along with this library. If not, see #include "config.h" #endif +#include /* exit() */ + #include #include "indicator-service.h" @@ -361,8 +363,9 @@ bus_get_cb (GObject * object, GAsyncResult * res, gpointer user_data) GDBusConnection * connection = g_bus_get_finish(res, &error); if (error != NULL) { - g_error("OMG! Unable to get a connection to DBus: %s", error->message); + g_warning("Unable to get a connection to the session DBus: %s", error->message); g_error_free(error); + exit (0); return; } -- cgit v1.2.3