diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index cd9581bf..0785ad0c 100644 --- a/code/sdl/sdl_glimp.c +++ b/code/sdl/sdl_glimp.c @@ -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);