diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index 033e83d46..9d783f3ca 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -1104,6 +1104,9 @@ int Wayland_input_lock_pointer(struct SDL_WaylandInput *input) if (!d->pointer_constraints) return -1; + if (!input->pointer) + return -1; + if (!input->relative_pointer) { relative_pointer = zwp_relative_pointer_manager_v1_get_relative_pointer(