aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/cocoa.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index f585a5c177..a8f1cdaf92 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1674,7 +1674,9 @@ static void create_initial_menus(void)
/* Returns a name for a given console */
static NSString * getConsoleName(QemuConsole * console)
{
- return [NSString stringWithFormat: @"%s", qemu_console_get_label(console)];
+ g_autofree char *label = qemu_console_get_label(console);
+
+ return [NSString stringWithUTF8String:label];
}
/* Add an entry to the View menu for each console */