mirror of
https://github.com/godotengine/godot
synced 2024-09-05 13:48:32 +00:00
Fix potential infinite loop when using global menu
This commit is contained in:
parent
4b7776e31b
commit
43ed8d4768
|
@ -212,7 +212,7 @@ String DisplayServer::global_menu_get_item_submenu(const String &p_menu_root, in
|
|||
ERR_FAIL_NULL_V(nmenu, String());
|
||||
RID rid = nmenu->get_item_submenu(_get_rid_from_name(nmenu, p_menu_root), p_idx);
|
||||
if (!nmenu->is_system_menu(rid)) {
|
||||
for (HashMap<String, RID>::Iterator E = menu_names.begin(); E;) {
|
||||
for (HashMap<String, RID>::Iterator E = menu_names.begin(); E; ++E) {
|
||||
if (E->value == rid) {
|
||||
return E->key;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue