diff options
author | Luke Smith <luke@lukesmith.xyz> | 2020-05-12 11:31:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 11:31:28 -0400 |
commit | ed5803de189bf32c3a9b171104e22946b147a661 (patch) | |
tree | c1813e8cff5934997a0a405fe792bf2240e8a7fe | |
parent | 9a5ddbabc595dbdc7e48ed164a016b6327fb7155 (diff) | |
parent | ddb3992e8b46d7f78887f3cf7b0bf2363b82d16f (diff) |
Merge pull request #66 from mokulus/stack-fix
Fix crashes when stack is empty
-rw-r--r-- | dwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -990,7 +990,7 @@ focusstack(const Arg *arg) int i = stackpos(arg); Client *c, *p; - if (i < 0 || selmon->sel->isfullscreen) + if (i < 0 || !selmon->sel || selmon->sel->isfullscreen) return; for(p = NULL, c = selmon->clients; c && (i || !ISVISIBLE(c)); @@ -1404,7 +1404,7 @@ pushstack(const Arg *arg) { int i = stackpos(arg); Client *sel = selmon->sel, *c, *p; - if(i < 0) + if(i < 0 || !sel) return; else if(i == 0) { detach(sel); |