소스 검색

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

Petar Popovic 1 년 전
부모
커밋
d4819db5e6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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) {
             if (seat->keyboard.wl_keyboard) {
                 SDL_RemoveKeyboard(seat->keyboard.sdl_id, true);
                 SDL_RemoveKeyboard(seat->keyboard.sdl_id, true);
             }
             }
-            if (seat->keyboard.wl_keyboard) {
+            if (seat->pointer.wl_pointer) {
                 SDL_RemoveMouse(seat->pointer.sdl_id, true);
                 SDL_RemoveMouse(seat->pointer.sdl_id, true);
             }
             }
             Wayland_SeatDestroy(seat, true);
             Wayland_SeatDestroy(seat, true);