aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorCalvin Lee <cyrus296@gmail.com>2017-08-12 12:48:15 +0200
committerCalvin Lee <cyrus296@gmail.com>2017-08-12 12:52:31 +0200
commitba6224f4e5b62ea48d37d00022d18be5ec844604 (patch)
treea645a658b708e507abba06e9db853ed6f32b8c3f /swaybar
parent2689238058fcbeebc4a6b2b224fca39ca48f2ded (diff)
Prevent crash if DBus connection is NULL
Fixes #1307
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/tray/dbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/swaybar/tray/dbus.c b/swaybar/tray/dbus.c
index f562baeb..8e719fd9 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;
}