diff options
| author | bakkeby <[email protected]> | 2020-05-27 14:10:51 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-05-27 14:10:51 +0200 |
| commit | 1bf50728a7acaba9ed32d423b4118d52db274f39 (patch) | |
| tree | 40f47859c8a3b5a6c1a1bb70a1072430f45f0501 | |
| parent | e79aec52c28af424adf4b31ff5d4504303c61383 (diff) | |
| download | dwm-flexipatch-1bf50728a7acaba9ed32d423b4118d52db274f39.tar.gz dwm-flexipatch-1bf50728a7acaba9ed32d423b4118d52db274f39.zip | |
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.
| -rw-r--r-- | dwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -937,11 +937,11 @@ buttonpress(XEvent *e) c = m->clients; do { - if (!ISVISIBLE(c)) + if (!c || !ISVISIBLE(c)) continue; else 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) { click = ClkWinTitle; |
