From ba6224f4e5b62ea48d37d00022d18be5ec844604 Mon Sep 17 00:00:00 2001 From: Calvin Lee Date: Sat, 12 Aug 2017 12:48:15 +0200 Subject: [PATCH] Prevent crash if DBus connection is NULL Fixes #1307 --- swaybar/tray/dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swaybar/tray/dbus.c b/swaybar/tray/dbus.c index f562baebf..8e719fd9e 100644 --- a/swaybar/tray/dbus.c +++ b/swaybar/tray/dbus.c @@ -138,7 +138,7 @@ static void dispatch_status(DBusConnection *connection, DBusDispatchStatus new_s /* Public functions below */ void dispatch_dbus() { - if (!should_dispatch) { + if (!should_dispatch || !conn) { return; }