Wayland: remove memory access error while computing screen work area

This commit is contained in:
ManoloFLTK 2025-12-06 10:02:11 +01:00
parent b1d3ee13bd
commit a4ebd8564d

View File

@ -1561,7 +1561,7 @@ static void xdg_toplevel_configure(void *v, struct xdg_toplevel *xdg_toplevel,
struct configure_s *data = (struct configure_s*)v; struct configure_s *data = (struct configure_s*)v;
data->W = width; data->W = width;
data->H = height; data->H = height;
data->state = (states ? *(uint32_t *)(states->data) : 0); data->state = (width && height && states ? *(uint32_t *)(states->data) : 0);
} }
static const struct xdg_toplevel_listener xdg_toplevel_listener = { static const struct xdg_toplevel_listener xdg_toplevel_listener = {