Check for null monitor in resize function

This commit is contained in:
Rutherther 2024-05-31 16:00:50 +02:00
parent 00e23bedfe
commit 92d7a8264d

8
dwl.c
View File

@ -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);