diff --git a/src/dbus.c b/src/dbus.c index 96bfefd..8652b49 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -488,6 +488,11 @@ cdbus_apdarg_wids(session_t *ps, DBusMessage *msg, const void *data) { ++count; } + if (!count) { + // Nothing to append + return true; + } + // Allocate memory for an array of window IDs auto arr = ccalloc(count, cdbus_window_t);