Fix crashes after reloading automation scripts

Originally committed to SVN as r6447.
This commit is contained in:
Thomas Goyne 2012-02-07 01:22:15 +00:00
parent 489d5bbec6
commit 51cbc353b3
1 changed files with 3 additions and 0 deletions

View File

@ -215,6 +215,9 @@ public:
find_if(dynamic_items.begin(), dynamic_items.end(), menu_item_cmp(item));
if (it != dynamic_items.end())
dynamic_items.erase(it);
it = find_if(static_items.begin(), static_items.end(), menu_item_cmp(item));
if (it != static_items.end())
static_items.erase(it);
}
/// Create a MRU menu and register the needed handlers