Don't create multiple windows when GL context creation fails

This commit is contained in:
Zack Middleton 2018-05-28 17:07:38 -05:00
parent 4fa93fbfd4
commit 77de5019b9

View file

@ -641,6 +641,8 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool
if( ( SDL_glContext = SDL_GL_CreateContext( SDL_window ) ) == NULL )
{
ri.Printf( PRINT_DEVELOPER, "SDL_GL_CreateContext failed: %s\n", SDL_GetError( ) );
SDL_DestroyWindow( SDL_window );
SDL_window = NULL;
continue;
}