diff options
author | Zack Middleton <zturtleman@gmail.com> | 2014-03-15 17:53:42 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-08-28 11:03:31 +0100 |
commit | 2818a6da1e1c4a66ce01fe06d12cffd996c40237 (patch) | |
tree | 843dd9bb9b5825978c6f3135bced7a219bec682a /src | |
parent | 57e0583885b51fb736589f6187facfcfb9d06a67 (diff) |
Don't crash when fail to create SDL window
Diffstat (limited to 'src')
-rw-r--r-- | src/sdl/sdl_glimp.c | 6 |
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); |