From 794d7000436c33c540dec762ea5e87797bcb95e6 Mon Sep 17 00:00:00 2001 From: Jakub Date: Sat, 20 Jul 2024 01:09:20 -0400 Subject: [PATCH] add protections to movestack function - prevents crash --- dwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwm.c b/dwm.c index 33a73b1..a435cc7 100644 --- a/dwm.c +++ b/dwm.c @@ -1833,6 +1833,8 @@ nexttiled(Client *c) void movestack(const Arg *arg) { Client *c = NULL, *p = NULL, *pc = NULL, *i; + if (!selmon->sel) + return; if(arg->i > 0) { /* find the client after selmon->sel */