Fixed leak of wide string window title.

This commit is contained in:
Camilla Berglund 2013-01-22 23:28:41 +01:00
parent 2ece101f0e
commit 6abb8e4c86

View File

@ -777,14 +777,14 @@ static int createWindow(_GLFWwindow* window,
_glfw.win32.instance, _glfw.win32.instance,
window); // Pass GLFW window to WM_CREATE window); // Pass GLFW window to WM_CREATE
free(wideTitle);
if (!window->win32.handle) if (!window->win32.handle)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to create window"); _glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to create window");
return GL_FALSE; return GL_FALSE;
} }
free(wideTitle);
// Initialize cursor position data // Initialize cursor position data
GetCursorPos(&pos); GetCursorPos(&pos);
ScreenToClient(window->win32.handle, &pos); ScreenToClient(window->win32.handle, &pos);