summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-12-06 10:02:11 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-12-06 10:02:11 +0100
commita4ebd8564deb83237d1b21250ebbe388aad30940 (patch)
tree241cb86ee85ed4fa2fdb052159673c87a4206259 /src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
parentb1d3ee13bd1be3fefda2be490ce773afab2ade04 (diff)
Wayland: remove memory access error while computing screen work area
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 2a8013270..b7204d00c 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -1561,7 +1561,7 @@ static void xdg_toplevel_configure(void *v, struct xdg_toplevel *xdg_toplevel,
struct configure_s *data = (struct configure_s*)v;
data->W = width;
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 = {