Merge commit 'c12f46b100d22a0e06a64c5b6d1baa3f446d34e6' into main

main
Sam Lantinga 2021-03-22 19:16:40 -07:00
commit 38b61a3dfa
1 changed files with 3 additions and 1 deletions

View File

@ -1071,7 +1071,7 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
{ {
SDL_WindowData *windata = (SDL_WindowData *) window->driverdata; SDL_WindowData *windata = (SDL_WindowData *) window->driverdata;
SDL_DisplayData *dispdata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata; SDL_DisplayData *dispdata = (SDL_DisplayData *) SDL_GetDisplayForWindow(window)->driverdata;
SDL_VideoData *viddata = windata->viddata; SDL_VideoData *viddata;
SDL_bool is_vulkan = window->flags & SDL_WINDOW_VULKAN; /* Is this a VK window? */ SDL_bool is_vulkan = window->flags & SDL_WINDOW_VULKAN; /* Is this a VK window? */
unsigned int i, j; unsigned int i, j;
@ -1079,6 +1079,8 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
return; return;
} }
viddata = windata->viddata;
if ( !is_vulkan && viddata->gbm_init) { if ( !is_vulkan && viddata->gbm_init) {
/* Destroy cursor GBM BO of the display of this window. */ /* Destroy cursor GBM BO of the display of this window. */