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...
This commit is contained in:
Sam Lantinga 2010-07-14 07:48:35 -07:00
parent 4305137b7d
commit 43503a8b99

View file

@ -3271,7 +3271,7 @@ SDL_GL_SwapWindow(SDL_Window * window)
void void
SDL_GL_DeleteContext(SDL_GLContext context) SDL_GL_DeleteContext(SDL_GLContext context)
{ {
if (!_this || !context) { if (!_this || !_this->gl_data || !context) {
return; return;
} }
_this->GL_MakeCurrent(_this, NULL, NULL); _this->GL_MakeCurrent(_this, NULL, NULL);