comparison src/video/SDL_video.c @ 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 dbbfdb9ea716
children e1664f94f026 436183eb30c8
comparison
equal deleted inserted replaced
4525:3abf0b9cafad 4526:c04dd942610d
3269 } 3269 }
3270 3270
3271 void 3271 void
3272 SDL_GL_DeleteContext(SDL_GLContext context) 3272 SDL_GL_DeleteContext(SDL_GLContext context)
3273 { 3273 {
3274 if (!_this || !context) { 3274 if (!_this || !_this->gl_data || !context) {
3275 return; 3275 return;
3276 } 3276 }
3277 _this->GL_MakeCurrent(_this, NULL, NULL); 3277 _this->GL_MakeCurrent(_this, NULL, NULL);
3278 _this->GL_DeleteContext(_this, context); 3278 _this->GL_DeleteContext(_this, context);
3279 } 3279 }