From 92d7a8264d0299c8e6bd212da5c10c29769c65d0 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Fri, 31 May 2024 16:00:50 +0200 Subject: [PATCH] Check for null monitor in resize function --- dwl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 071fc6d..cbca42c 100644 --- a/dwl.c +++ b/dwl.c @@ -2039,8 +2039,14 @@ requestmonstate(struct wl_listener *listener, void *data) void resize(Client *c, struct wlr_box geo, int interact) { - struct wlr_box *bbox = interact ? &sgeom : &c->mon->w; + struct wlr_box *bbox; struct wlr_box clip; + + if (!c->mon) + return; + + bbox = interact ? &sgeom : &c->mon->w; + client_set_bounds(c, geo.width, geo.height); c->geom = geo; applybounds(c, bbox); -- 2.48.1