Fixed crash if a window couldn't be created on Windows

Fixes https://github.com/libsdl-org/SDL/issues/11482
This commit is contained in:
Sam Lantinga 2025-03-19 20:09:47 -07:00
parent 07e4dea693
commit 3415bc920a
1 changed files with 1 additions and 1 deletions

View File

@ -1311,7 +1311,7 @@ SDL_FullscreenResult WIN_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Window
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
SDL_DisplayData *displaydata = display->internal;
SDL_WindowData *data = window->internal;
HWND hwnd = data->hwnd;
HWND hwnd = data ? data->hwnd : NULL;
MONITORINFO minfo;
DWORD style, styleEx;
HWND top;