+2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
+ to where it is used, to avoid autorelease issues (Bug#14050).
+
2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
`write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
id menu = [NSApp mainMenu];
static EmacsMenu *last_submenu = nil;
BOOL needsSet = NO;
- const char *submenuTitle = [[submenu title] UTF8String];
bool owfi;
Lisp_Object items;
widget_value *wv, *first_wv, *prev_wv = 0;
/* FIXME: we'd like to only parse the needed submenu, but this
was causing crashes in the _common parsing code.. need to make
sure proper initialization done.. */
-/* if (submenu && strcmp (submenuTitle, SSDATA (string)))
+/* if (submenu && strcmp ([[submenu title] UTF8String], SSDATA (string)))
continue; */
submenu_start[i] = menu_items_used;
{
/* should have found a menu for this one but didn't */
fprintf (stderr, "ERROR: did not find lisp menu for submenu '%s'.\n",
- submenuTitle);
+ [[submenu title] UTF8String]);
discard_menu_items ();
unbind_to (specpdl_count, Qnil);
[pool release];
string = AREF (items, i + 1);
if (NILP (string))
break;
-/* if (submenu && strcmp (submenuTitle, SSDATA (string)))
- continue; */
wv->name = SSDATA (string);
update_submenu_strings (wv->contents);
create a new menu for each sub and fill it. */
if (submenu)
{
+ const char *submenuTitle = [[submenu title] UTF8String];
for (wv = first_wv->contents; wv; wv = wv->next)
{
if (!strcmp (submenuTitle, wv->name))