Explorar el Código

Need to check structure version before setting xdg_toplevel to NULL

Sam Lantinga hace 4 años
padre
commit
9672d58119
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/video/wayland/SDL_waylandwindow.c

+ 3 - 1
src/video/wayland/SDL_waylandwindow.c

@@ -651,7 +651,9 @@ Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
             }
         } else {
             info->info.wl.xdg_surface = NULL;
-            info->info.wl.xdg_toplevel = NULL;
+            if (version >= SDL_VERSIONNUM(2, 0, 17)) {
+                info->info.wl.xdg_toplevel = NULL;
+            }
         }
     }