summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sdl/sdl_glimp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sdl/sdl_glimp.c b/src/sdl/sdl_glimp.c
index bfd8efa9..6c313cda 100644
--- a/src/sdl/sdl_glimp.c
+++ b/src/sdl/sdl_glimp.c
@@ -477,6 +477,12 @@ static int GLimp_SetMode( qboolean failSafe, qboolean fullscreen, qboolean nobor
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);