diff --git a/dwm.c b/dwm.c index 242909e..c58300f 100644 --- a/dwm.c +++ b/dwm.c @@ -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);