aboutsummaryrefslogtreecommitdiffstats
path: root/src/macmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/macmenu.c')
-rw-r--r--src/macmenu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/macmenu.c b/src/macmenu.c
index 007fab15eab..af24cfe237c 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -2267,6 +2267,14 @@ add_menu_item (MenuHandle menu, widget_value *wv, int submenu,
2267 CFStringRef string = 2267 CFStringRef string =
2268 CFStringCreateWithCString (NULL, item_name, kCFStringEncodingUTF8); 2268 CFStringCreateWithCString (NULL, item_name, kCFStringEncodingUTF8);
2269 2269
2270 if (string == NULL)
2271 {
2272 /* Failed to interpret as UTF8. Fall back to Mac Roman.
2273 Maybe wv->name is corrupted? */
2274 string = CFStringCreateWithCString (NULL, item_name,
2275 kCFStringEncodingMacRoman);
2276 }
2277
2270 SetMenuItemTextWithCFString (menu, pos, string); 2278 SetMenuItemTextWithCFString (menu, pos, string);
2271 CFRelease (string); 2279 CFRelease (string);
2272 } 2280 }