From d4819db5e6abc992128c38356fae6453652a8fc4 Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Sat, 9 Aug 2025 15:36:42 +0200 Subject: [PATCH] SDL_waylandvideo.c:display_remove_global(): Check pointer when removing mouse --- src/video/wayland/SDL_waylandvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index e9a97a98f1..68fb9961c8 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -1374,7 +1374,7 @@ static void display_remove_global(void *data, struct wl_registry *registry, uint if (seat->keyboard.wl_keyboard) { SDL_RemoveKeyboard(seat->keyboard.sdl_id, true); } - if (seat->keyboard.wl_keyboard) { + if (seat->pointer.wl_pointer) { SDL_RemoveMouse(seat->pointer.sdl_id, true); } Wayland_SeatDestroy(seat, true);