This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 35bb7d2ae844b852acb2a04cd90b6cf8df1c97f0
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Sat Mar 15 23:06:10 2014 +0000

    All: Don't crash when fail to create SDL window
---
 MP/code/sdl/sdl_glimp.c | 6 ++++++
 SP/code/sdl/sdl_glimp.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/MP/code/sdl/sdl_glimp.c b/MP/code/sdl/sdl_glimp.c
index da90a02..f1aea87 100644
--- a/MP/code/sdl/sdl_glimp.c
+++ b/MP/code/sdl/sdl_glimp.c
@@ -492,6 +492,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);
diff --git a/SP/code/sdl/sdl_glimp.c b/SP/code/sdl/sdl_glimp.c
index da90a02..f1aea87 100644
--- a/SP/code/sdl/sdl_glimp.c
+++ b/SP/code/sdl/sdl_glimp.c
@@ -492,6 +492,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);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to