summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-09-24 13:31:07 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-09-24 13:31:07 -0400
commit39f974358c00de3f1307d895ded61b768c53294b (patch)
tree65e9c5162625d0ec8f22e97ada8c2f6557a3564b
parent0fb98606ef098a2eab2157beb2ac770f4898d98a (diff)
downloadgnome-shell-matthiasc/misc-fixes.tar.gz
Check error of g_dbus_proxy_new_sync callmatthiasc/misc-fixes
Otherwise errors pile up and we crash later on.
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 35816a12e..fe43cb09f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -132,6 +132,12 @@ shell_dbus_init (gboolean replace)
NULL, /* cancellable */
&error);
+ if (!bus)
+ {
+ g_printerr ("Failed to get a session bus proxy: %s", error->message);
+ exit (1);
+ }
+
request_name_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT;
if (replace)
request_name_flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;