Browse Source

SDL_waylandvideo.c:display_remove_global(): Check pointer when removing mouse

Petar Popovic 1 month ago
parent
commit
d4819db5e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/video/wayland/SDL_waylandvideo.c

+ 1 - 1
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);