Need to check structure version before setting xdg_toplevel to NULL

main
Sam Lantinga 2021-09-26 14:22:11 -07:00
parent 14f225198d
commit 9672d58119
1 changed files with 3 additions and 1 deletions

View File

@ -651,7 +651,9 @@ Wayland_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
} }
} else { } else {
info->info.wl.xdg_surface = NULL; 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;
}
} }
} }