From aea8dd6ae122bdc99e104afe019479d45755f239 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Sun, 3 Sep 2023 11:44:30 -0600 Subject: return early if the client doesn't have monitor in setfloating there is still a bug, but for now this prevents a segfault Bug: https://github.com/djpohly/dwl/issues/472 --- dwl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwl.c b/dwl.c index 4ff5c37..edea5b1 100644 --- a/dwl.c +++ b/dwl.c @@ -2026,6 +2026,8 @@ void setfloating(Client *c, int floating) { c->isfloating = floating; + if (!c->mon) + return; wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]); arrange(c->mon); printstatus(); -- cgit v1.2.3