Mercurial > sdl-ios-xcode
diff src/video/SDL_video.c @ 4526:c04dd942610d
Fixed bug #1000
Don't crash if someone tries to delete a context after we've unloaded the library. In this case it's SDL_compat that doesn't know SDL_VideoQuit() has been called. Hmm...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 14 Jul 2010 07:48:35 -0700 |
parents | dbbfdb9ea716 |
children | e1664f94f026 436183eb30c8 |
line wrap: on
line diff
--- a/src/video/SDL_video.c Wed Jul 14 07:31:35 2010 -0700 +++ b/src/video/SDL_video.c Wed Jul 14 07:48:35 2010 -0700 @@ -3271,7 +3271,7 @@ void SDL_GL_DeleteContext(SDL_GLContext context) { - if (!_this || !context) { + if (!_this || !_this->gl_data || !context) { return; } _this->GL_MakeCurrent(_this, NULL, NULL);