fix posible NULL-dereference in wl_surface.commit handler

This commit is contained in:
korei999 2024-01-04 01:47:04 +02:00
parent 56c19349a1
commit 8c948f751a

2
dwl.c
View file

@ -826,7 +826,7 @@ commitnotify(struct wl_listener *listener, void *data)
{ {
Client *c = wl_container_of(listener, c, commit); Client *c = wl_container_of(listener, c, commit);
if (client_surface(c)->mapped) if (client_surface(c)->mapped && c->mon)
resize(c, c->geom, (c->isfloating && !c->isfullscreen), c->bw > 0); resize(c, c->geom, (c->isfloating && !c->isfullscreen), c->bw > 0);
/* mark a pending resize as completed */ /* mark a pending resize as completed */