Don't crash when fail to create SDL window

This commit is contained in:
Zack Middleton 2014-03-15 17:53:42 -05:00
parent dafed0fd66
commit 8455b5a833

View file

@ -462,6 +462,12 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder)
SDL_FreeSurface( icon );
if( !SDL_window )
{
ri.Printf( PRINT_ALL, "Couldn't get a visual\n" );
return RSERR_INVALID_MODE;
}
GLimp_DetectAvailableModes();
glstring = (char *) qglGetString (GL_RENDERER);