Fixed bug #1000
authorSam Lantinga
Wed, 14 Jul 2010 07:48:35 -0700
changeset 4526c04dd942610d
parent 4525 3abf0b9cafad
child 4527 3ce59cbecaa3
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...
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Wed Jul 14 07:31:35 2010 -0700
     1.2 +++ b/src/video/SDL_video.c	Wed Jul 14 07:48:35 2010 -0700
     1.3 @@ -3271,7 +3271,7 @@
     1.4  void
     1.5  SDL_GL_DeleteContext(SDL_GLContext context)
     1.6  {
     1.7 -    if (!_this || !context) {
     1.8 +    if (!_this || !_this->gl_data || !context) {
     1.9          return;
    1.10      }
    1.11      _this->GL_MakeCurrent(_this, NULL, NULL);