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; }