Fixed crash if SDL_GetVideoDisplayForWindow() returns NULL
This commit is contained in:
parent
20cd4290d7
commit
9a4ae4b9ed
1 changed files with 3 additions and 1 deletions
|
@ -2406,7 +2406,9 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
|
|||
window->undefined_y = undefined_y;
|
||||
|
||||
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)) {
|
||||
SDL_Rect bounds;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue