From 8c3d2f769fc83e4a079d642381cf04453e7b44aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Tue, 10 Dec 2019 13:47:19 +0100 Subject: [PATCH] Cocoa: Fix duplicate conversion of title string (cherry picked from commit a875a536b76233d7f3024cf9aec17086aa6bc795) --- src/cocoa_window.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 5046d58c..3cf8dd3e 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -967,10 +967,11 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window) void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title) { @autoreleasepool { - [window->ns.object setTitle:@(title)]; + NSString* string = @(title); + [window->ns.object setTitle:string]; // HACK: Set the miniwindow title explicitly as setTitle: doesn't update it // if the window lacks NSWindowStyleMaskTitled - [window->ns.object setMiniwindowTitle:@(title)]; + [window->ns.object setMiniwindowTitle:string]; } // autoreleasepool }