Cover case where title == window->title

This commit is contained in:
Doug Binks 2024-02-11 16:32:11 +00:00
parent a079c99f80
commit dee8814e3b

View File

@ -532,8 +532,9 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title)
_GLFW_REQUIRE_INIT();
_glfw_free(window->title);
char* prev = window->title;
window->title = _glfw_strdup(title);
_glfw_free(prev);
_glfw.platform.setWindowTitle(window, title);
}