mirror of
https://github.com/libsdl-org/SDL
synced 2024-11-20 16:06:10 -07:00
Fixed crash if a window ends up without a display
This commit is contained in:
parent
35e6c92c3c
commit
1413848f41
1 changed files with 1 additions and 1 deletions
|
@ -2413,7 +2413,7 @@ SDL_Window *SDL_CreateWindowWithProperties(SDL_PropertiesID props)
|
|||
if (flags & SDL_WINDOW_FULLSCREEN || IsFullscreenOnly(_this)) {
|
||||
SDL_Rect bounds;
|
||||
|
||||
SDL_GetDisplayBounds(display->id, &bounds);
|
||||
SDL_GetDisplayBounds(display ? display->id : SDL_GetPrimaryDisplay(), &bounds);
|
||||
window->x = bounds.x;
|
||||
window->y = bounds.y;
|
||||
window->w = bounds.w;
|
||||
|
|
Loading…
Reference in a new issue