mirror of
https://github.com/glfw/glfw.git
synced 2025-06-07 08:14:57 +00:00
Cover case where title == window->title
This commit is contained in:
parent
a079c99f80
commit
dee8814e3b
@ -532,8 +532,9 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title)
|
|||||||
|
|
||||||
_GLFW_REQUIRE_INIT();
|
_GLFW_REQUIRE_INIT();
|
||||||
|
|
||||||
_glfw_free(window->title);
|
char* prev = window->title;
|
||||||
window->title = _glfw_strdup(title);
|
window->title = _glfw_strdup(title);
|
||||||
|
_glfw_free(prev);
|
||||||
|
|
||||||
_glfw.platform.setWindowTitle(window, title);
|
_glfw.platform.setWindowTitle(window, title);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user