Fixed bug 1605 - SDL_DestroyWindow causes erroneous error message
authorSam Lantinga <slouken@libsdl.org>
Fri, 28 Sep 2012 04:03:06 -0700
changeset 6496 d7cb947898d7
parent 6495 2bf42c5e897a
child 6497 e844e2632149
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
--- a/src/video/SDL_video.c	Fri Sep 28 03:54:39 2012 -0700
+++ b/src/video/SDL_video.c	Fri Sep 28 04:03:06 2012 -0700
@@ -1978,7 +1978,7 @@
     /* 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);
         }
     }