Fixed bug 1605 - SDL_DestroyWindow causes erroneous error message

You can't pass a NULL window into SDL_GL_MakeCurrent()
This commit is contained in:
Sam Lantinga 2012-09-28 04:03:06 -07:00
parent 29b5947d0c
commit 360f769275

View file

@ -1978,7 +1978,7 @@ SDL_DestroyWindow(SDL_Window * window)
/* make no context current if this is the current context window. */
if (window->flags & SDL_WINDOW_OPENGL) {
if (_this->current_glwin == window) {
SDL_GL_MakeCurrent(NULL, NULL);
SDL_GL_MakeCurrent(window, NULL);
}
}