diff --git a/src/common/platform/posix/sdl/sdlglvideo.cpp b/src/common/platform/posix/sdl/sdlglvideo.cpp index e9ef2267c..4a419b10d 100644 --- a/src/common/platform/posix/sdl/sdlglvideo.cpp +++ b/src/common/platform/posix/sdl/sdlglvideo.cpp @@ -448,6 +448,10 @@ SDLVideo::SDLVideo () if (Priv::softpolyEnabled) { Priv::CreateWindow(SDL_WINDOW_HIDDEN); + if (Priv::window == nullptr) + { + I_FatalError("Could not create SoftPoly window:\n%s\n",SDL_GetError()); + } } #endif } @@ -667,6 +671,10 @@ SystemGLFrameBuffer::SystemGLFrameBuffer(void *hMonitor, bool fullscreen) break; } } + if (Priv::window == nullptr) + { + I_FatalError("Could not create OpenGL window:\n%s\n",SDL_GetError()); + } } SystemGLFrameBuffer::~SystemGLFrameBuffer ()