diff --git a/patch/movestack.c b/patch/movestack.c index 2406a87..1fed29b 100644 --- a/patch/movestack.c +++ b/patch/movestack.c @@ -4,6 +4,8 @@ movestack(const Arg *arg) Client *c = NULL, *p = NULL, *pc = NULL, *i; if (arg->i > 0) { + if (!selmon->sel) + return; /* find the client after selmon->sel */ for (c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next); if (!c)