X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=vid_wgl.c;h=b9a0027d31c72748fbe57d48ec7096c43c40d424;hb=259c8a118477de2e8e31e86e7dfb0d20698b0489;hp=9251b84b44116b5b31e2710f561d7c5e95280a43;hpb=2e83f8e2e245189d6f1bf28a45dc42b8f480b12d;p=xonotic%2Fdarkplaces.git diff --git a/vid_wgl.c b/vid_wgl.c index 9251b84b..b9a0027d 100644 --- 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(); }