Movestack can cause dwm to crash if there are no selections on the monitor
This commit is contained in:
@ -4,6 +4,8 @@ movestack(const Arg *arg)
|
|||||||
Client *c = NULL, *p = NULL, *pc = NULL, *i;
|
Client *c = NULL, *p = NULL, *pc = NULL, *i;
|
||||||
|
|
||||||
if (arg->i > 0) {
|
if (arg->i > 0) {
|
||||||
|
if (!selmon->sel)
|
||||||
|
return;
|
||||||
/* find the client after selmon->sel */
|
/* find the client after selmon->sel */
|
||||||
for (c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
|
for (c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
|
||||||
if (!c)
|
if (!c)
|
||||||
|
Reference in New Issue
Block a user