From f7228bb56294714e8cdb8b39be3b7c6967240c54 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 11 Feb 2016 16:41:39 +0100 Subject: [PATCH] Fix window class not being unregistered The helper window kept the window class from being unregistered. Fixes #704. --- src/win32_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/win32_init.c b/src/win32_init.c index c26b93db..57acdb3a 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -387,6 +387,9 @@ int _glfwPlatformInit(void) void _glfwPlatformTerminate(void) { + if (_glfw.win32.helperWindow) + DestroyWindow(_glfw.win32.helperWindow); + _glfwUnregisterWindowClassWin32(); // Restore previous foreground lock timeout system setting @@ -405,9 +408,6 @@ void _glfwPlatformTerminate(void) _glfwTerminateJoysticksWin32(); _glfwTerminateThreadLocalStorageWin32(); - if (_glfw.win32.helperWindow) - DestroyWindow(_glfw.win32.helperWindow); - freeLibraries(); }