mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +00:00
Don't crash when fail to create SDL window
This commit is contained in:
parent
dafed0fd66
commit
8455b5a833
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue