Handle SDL_CreateWindow failure slightly better

Might explain weird breakage we experience on chromebooks. Difficult to say as we don't have access to chromebooks.
This commit is contained in:
Tamás Bálint Misius 2022-03-26 17:40:17 +01:00
parent 14348437a6
commit 76b89f8da1
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -279,6 +279,10 @@ bool RecreateWindow()
sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * scale, WINDOWH * scale,
flags);
if (!sdl_window)
{
return false;
}
sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0);
if (!sdl_renderer)
{