changeset 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 3abf0b9cafad
children 3ce59cbecaa3
files src/video/SDL_video.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);