diff --git a/src/window.c b/src/window.c index bc24582c3..cf1b0e711 100644 --- a/src/window.c +++ b/src/window.c @@ -534,9 +534,9 @@ GLFWAPI void glfwSetWindowTitle(GLFWwindow* handle, const char* title) char* prev = window->title; window->title = _glfw_strdup(title); - _glfw_free(prev); _glfw.platform.setWindowTitle(window, title); + _glfw_free(prev); } GLFWAPI void glfwSetWindowIcon(GLFWwindow* handle,