From a7ad49add4681df2e3ae25a81a4e10a89a85f7ba Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 28 Sep 2012 04:03:06 -0700 Subject: [PATCH] Fixed bug 1605 - SDL_DestroyWindow causes erroneous error message You can't pass a NULL window into SDL_GL_MakeCurrent() --- 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 885d0430b..da083c920 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -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); } }