From 19421373b9837860115f1fcf70f160f9d716aee1 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Thu, 25 Oct 2018 14:07:44 +0100 Subject: swaybar: when scrolling, check that there are workspaces to scroll on --- swaybar/input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swaybar/input.c b/swaybar/input.c index 4aefc6d6..263d0253 100644 --- a/swaybar/input.c +++ b/swaybar/input.c @@ -180,6 +180,10 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer, return; } + if (!sway_assert(!wl_list_empty(&output->workspaces), "axis with no workspaces")) { + return; + } + struct swaybar_workspace *first = wl_container_of(output->workspaces.next, first, link); struct swaybar_workspace *last = -- cgit v1.2.3