mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 20:11:58 +00:00
Fixed leak of wide string window title.
This commit is contained in:
parent
2ece101f0e
commit
6abb8e4c86
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user