mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
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.
This commit is contained in:
parent
e79aec52c2
commit
1bf50728a7
4
dwm.c
4
dwm.c
@ -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…
Reference in New Issue
Block a user