mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 22:05:59 +00:00
Fixed crash if SDL_GetVideoDisplayForWindow() returns NULL
This commit is contained in:
@@ -2406,7 +2406,9 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
|
|||||||
window->undefined_y = undefined_y;
|
window->undefined_y = undefined_y;
|
||||||
|
|
||||||
SDL_VideoDisplay *display = SDL_GetVideoDisplayForWindow(window);
|
SDL_VideoDisplay *display = SDL_GetVideoDisplayForWindow(window);
|
||||||
SDL_SetWindowHDRProperties(window, &display->HDR, false);
|
if (display) {
|
||||||
|
SDL_SetWindowHDRProperties(window, &display->HDR, false);
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & SDL_WINDOW_FULLSCREEN || IsFullscreenOnly(_this)) {
|
if (flags & SDL_WINDOW_FULLSCREEN || IsFullscreenOnly(_this)) {
|
||||||
SDL_Rect bounds;
|
SDL_Rect bounds;
|
||||||
|
Reference in New Issue
Block a user