summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-06-30 11:42:23 -0400
committerMatthias Clasen <mclasen@redhat.com>2016-07-03 18:01:45 -0400
commit69f7a26f34082db1c1a7fb201671cc8d64cc476c (patch)
tree6464a024461847ef5813460b6fae17dd40aa629c
parentc88714b9cc5fafa5324159ce86950b2b44357c0d (diff)
downloadglib-69f7a26f34082db1c1a7fb201671cc8d64cc476c.tar.gz
portal support: handle errors
Return an error when we don't have a session bus connection. Pointed out by Cosimo and Mario.
-rw-r--r--gio/gappinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gio/gappinfo.c b/gio/gappinfo.c
index 0ea80510f..51de5d654 100644
--- a/gio/gappinfo.c
+++ b/gio/gappinfo.c
@@ -680,7 +680,9 @@ launch_default_with_portal (const char *uri,
GVariantBuilder opt_builder;
const char *parent_window = NULL;
- bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+ bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
+ if (bus == NULL)
+ return FALSE;
if (context)
{