From 172e226947add479fe32cd9123c3ac34c5e91947 Mon Sep 17 00:00:00 2001 From: Window Maker Date: Mon, 25 May 2026 12:51:47 +0200 Subject: [PATCH] wayland: fix NULL dereference in wl_pointer_query_full wWorkspaceForceChange passes NULL for root_x/root_y when it only needs the child window. Add NULL checks before dereferencing these pointers. --- src/backend/wayland/wl_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index e3ff601..ea623b5 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -6223,8 +6223,8 @@ wl_pointer_query_full(WNativeWindow root, /* Phase 54: return tracked virtual pointer position. */ (void)root; if (child_out) *child_out = WNATIVE_NONE; - *root_x = wl_state.pointer_x; - *root_y = wl_state.pointer_y; + if (root_x) *root_x = wl_state.pointer_x; + if (root_y) *root_y = wl_state.pointer_y; if (buttons_out) *buttons_out = 0; return wl_state.started ? 1 : 0; }