moved the GL_CloseLibrary call a bit
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Aug 2002 20:04:22 +0000 (20:04 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Aug 2002 20:04:22 +0000 (20:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2193 d7cf8633-e32d-0410-b094-e92efae38249

vid_wgl.c

index 9251b84..b9a0027 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -401,6 +401,9 @@ void VID_Shutdown (void)
                if (hRC)
                        wglDeleteContext(hRC);
 
+               // close the library before we get rid of the window
+               GL_CloseLibrary();
+
                if (hDC && mainwindow)
                        ReleaseDC(mainwindow, hDC);
 
@@ -414,8 +417,6 @@ void VID_Shutdown (void)
 
                VID_RestoreSystemGamma();
        }
-
-       GL_CloseLibrary();
 }