mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
macOS: Fix an abort due to an assertion when a program tries to set an invalid window title
Fixes #7271
This commit is contained in:
@@ -1963,9 +1963,11 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
||||
window->ns.object = nil;
|
||||
}
|
||||
|
||||
void _glfwPlatformSetWindowTitle(_GLFWwindow* window UNUSED, const char* title)
|
||||
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
||||
{
|
||||
if (!title) return;
|
||||
NSString* string = @(title);
|
||||
if (!string) return; // the runtime failed to convert title to an NSString
|
||||
[window->ns.object setTitle:string];
|
||||
// HACK: Set the miniwindow title explicitly as setTitle: doesn't update it
|
||||
// if the window lacks NSWindowStyleMaskTitled
|
||||
|
||||
Reference in New Issue
Block a user