[recipes] Survive without D-Bus
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Survive without D-Bus
- Date: Thu, 2 Mar 2017 11:59:46 +0000 (UTC)
commit d77113147d3e0a28d9446bf4c2fb98178038b6a9
Author: Matthias Clasen <mclasen Matthiass-MBP home>
Date: Thu Mar 2 06:47:42 2017 -0500
Survive without D-Bus
We already have error handling code if we don't find
the service we need, we can just use the same code
when we don't find the bus itself.
src/gr-utils.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-utils.c b/src/gr-utils.c
index af74a4f..56a7e6b 100644
--- a/src/gr-utils.c
+++ b/src/gr-utils.c
@@ -447,6 +447,9 @@ portals_available (void)
g_autoptr(GDBusConnection) bus = NULL;
bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+ if (!bus)
+ return FALSE;
+
portal = g_dbus_proxy_new_sync (bus,
0,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]