mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
[KMSDRM] Fix segmentation fault
Deference the windata pointer *after* checking that it's non-NULL. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This commit is contained in:
parent
100166d7d7
commit
c12f46b100
@ -1071,7 +1071,7 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
|
||||
{
|
||||
SDL_WindowData *windata = (SDL_WindowData *) 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? */
|
||||
unsigned int i, j;
|
||||
|
||||
@ -1079,6 +1079,8 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
|
||||
return;
|
||||
}
|
||||
|
||||
viddata = windata->viddata;
|
||||
|
||||
if ( !is_vulkan && viddata->gbm_init) {
|
||||
|
||||
/* Destroy cursor GBM BO of the display of this window. */
|
||||
|
Loading…
Reference in New Issue
Block a user