From d9999bf30c032137f022e98a44ccc61b36424cfc Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 13 Dec 2015 11:42:18 -0600 Subject: [PATCH] Fix minor memory leak in WGL interface. Would have a memory leak on game end --- Source/Core/Common/GL/GLInterface/WGL.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/Common/GL/GLInterface/WGL.cpp b/Source/Core/Common/GL/GLInterface/WGL.cpp index c6fa90ebd3..c0a1266804 100644 --- a/Source/Core/Common/GL/GLInterface/WGL.cpp +++ b/Source/Core/Common/GL/GLInterface/WGL.cpp @@ -73,9 +73,7 @@ bool cInterfaceWGL::Create(void *window_handle, bool core) m_window_handle = window_handle_reified; -#ifdef _WIN32 dllHandle = LoadLibrary(TEXT("OpenGL32.dll")); -#endif PIXELFORMATDESCRIPTOR pfd = // pfd Tells Windows How We Want Things To Be { @@ -174,6 +172,7 @@ void cInterfaceWGL::Shutdown() ERROR_LOG(VIDEO, "Attempt to release device context failed."); hDC = nullptr; } + FreeLibrary(dllHandle); }