mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Fix bug in :macmenu
Menu item not found lead to bad memory access.
This commit is contained in:
+9
-6
@@ -2834,11 +2834,6 @@ ex_macmenu(eap)
|
||||
vim_free(key);
|
||||
vim_free(arg);
|
||||
|
||||
theend:
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
vim_free(tofree);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Store all the keys that were set in the menu item.
|
||||
*/
|
||||
@@ -2851,13 +2846,21 @@ theend:
|
||||
menu->mac_key = mac_key;
|
||||
menu->mac_mods = mac_mods;
|
||||
}
|
||||
if (set_alt != -1)
|
||||
if (set_alt)
|
||||
menu->mac_alternate = mac_alternate;
|
||||
}
|
||||
else
|
||||
{
|
||||
vim_free(action);
|
||||
}
|
||||
|
||||
theend:
|
||||
#ifdef FEAT_MULTI_LANG
|
||||
vim_free(tofree);
|
||||
#else
|
||||
;
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif /* FEAT_GUI_MACVIM */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user