From cb01023db65d7f9f511a0c1b90b673ab09a56fe1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
 <leohdz172@proton.me>
Date: Sat, 27 Jul 2024 21:34:18 -0600
Subject: fix crash when re-mapping a client

Fixes: ab5c554d096ebca8446b7b1354c49be014b8b747
(cherry picked from commit b5abbc37d8161c7ac8d05010e0effbc6af81718b)
---
 dwl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'dwl.c')

diff --git a/dwl.c b/dwl.c
index 5f9491b..2db3c15 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2183,7 +2183,7 @@ resize(Client *c, struct wlr_box geo, int interact)
 	struct wlr_box *bbox;
 	struct wlr_box clip;
 
-	if (!c->mon || !c->scene)
+	if (!c->mon || !client_surface(c)->mapped)
 		return;
 
 	bbox = interact ? &sgeom : &c->mon->w;
-- 
cgit v1.2.3