From a20175b6756b5846f01edab41b3271dd9befae54 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 14 Jul 2010 07:48:35 -0700 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 435f01696..1673d0e0a 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3271,7 +3271,7 @@ SDL_GL_SwapWindow(SDL_Window * window) void SDL_GL_DeleteContext(SDL_GLContext context) { - if (!_this || !context) { + if (!_this || !_this->gl_data || !context) { return; } _this->GL_MakeCurrent(_this, NULL, NULL);