diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-06-26 16:59:19 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-06-29 13:26:09 -0400 |
commit | 02005e3f99cea2786f93a88e6ad8873733a26132 (patch) | |
tree | af3b8ae2f15f5009bb80898dbbc452c2d9abcbb5 | |
parent | bf1ef6089b7529a56e6a724e570eb5aa2c342e23 (diff) |
Fix #12520.14-rc3
-rw-r--r-- | swaybar/tray/dbus.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/swaybar/tray/dbus.c b/swaybar/tray/dbus.c index 333d398ed..22531aa65 100644 --- a/swaybar/tray/dbus.c +++ b/swaybar/tray/dbus.c @@ -158,6 +158,12 @@ int dbus_init() { dbus_error_init(&error); conn = dbus_bus_get(DBUS_BUS_SESSION, &error); + if (conn == NULL) { + sway_log(L_INFO, "Compiled with dbus support, but unable to connect to dbus"); + sway_log(L_INFO, "swaybar will be unable to display tray icons."); + return -1; + } + dbus_connection_set_exit_on_disconnect(conn, FALSE); if (dbus_error_is_set(&error)) { sway_log(L_ERROR, "Cannot get bus connection: %s\n", error.message); |