Fixed bug #1000
authorSam Lantinga <slouken@libsdl.org>
Wed, 14 Jul 2010 07:48:35 -0700
changeset 4526 c04dd942610d
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
--- 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);