# HG changeset patch # User Sam Lantinga # Date 1279118915 25200 # Node ID c04dd942610d6a71e9f4d9203f4990c67454f5de # Parent 3abf0b9cafad743041c06dbc6e4a24dfae230f0a 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... diff -r 3abf0b9cafad -r c04dd942610d src/video/SDL_video.c --- 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);