Awesomebar: dwm crashes on bar click with 0 clients

Clicking on the bar before any clients have been started results
in dwm crashing. This fix addresses that.
pull/32/head
bakkeby 4 years ago
parent e79aec52c2
commit 1bf50728a7

@ -937,11 +937,11 @@ buttonpress(XEvent *e)
c = m->clients; c = m->clients;
do { do {
if (!ISVISIBLE(c)) if (!c || !ISVISIBLE(c))
continue; continue;
else else
x += (1.0 / (double)m->bt) * m->btw; x += (1.0 / (double)m->bt) * m->btw;
} while (ev->x > x && (c = c->next)); } while (c && ev->x > x && (c = c->next));
if (c) { if (c) {
click = ClkWinTitle; click = ClkWinTitle;

Loading…
Cancel
Save