浏览代码

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) {
                 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);