diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-10-23 12:05:33 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-10-23 12:05:33 -0500 |
commit | 5e409a479788424ca879c95fc588fc7085291704 (patch) | |
tree | 7eb6572c8053d0bce1c4900d0c6fafed0f6d0752 /src | |
parent | fe77f0ec399ec462cef43f98cbcb95d97edfa361 (diff) | |
download | ayatana-indicator-application-5e409a479788424ca879c95fc588fc7085291704.tar.gz ayatana-indicator-application-5e409a479788424ca879c95fc588fc7085291704.tar.bz2 ayatana-indicator-application-5e409a479788424ca879c95fc588fc7085291704.zip |
don't crash if we can't get the session bus.
Diffstat (limited to 'src')
-rw-r--r-- | src/application-service-watcher.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c index edbf05b..006f3aa 100644 --- a/src/application-service-watcher.c +++ b/src/application-service-watcher.c @@ -24,6 +24,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "config.h" #endif +#include <stdlib.h> #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> #include <dbus/dbus-glib-bindings.h> @@ -158,8 +159,9 @@ application_service_watcher_init (ApplicationServiceWatcher *self) GError * error = NULL; DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (error != NULL) { - g_error("Unable to get session bus: %s", error->message); + g_warning("Unable to get session bus: %s", error->message); g_error_free(error); + exit(0); return; } |