diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-01 15:10:08 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-01 15:10:08 +0100 |
| commit | cfbccdbf443d0862b2f7de98db9dd962a405350e (patch) | |
| tree | d24c21c6a4ae069309e2f3c457929c6174955418 /scene/gui/popup_menu.cpp | |
| parent | 136c4e370d7bd84a4df35646d5395911f842171e (diff) | |
| parent | 137b25cf53f1a0761065eaff0ae2482458740369 (diff) | |
| download | redot-engine-cfbccdbf443d0862b2f7de98db9dd962a405350e.tar.gz | |
Merge pull request #84183 from jsjtxietian/fix-activate_item_by_event-crash
Fix `activate_item_by_event` infinite recursion crash
Diffstat (limited to 'scene/gui/popup_menu.cpp')
| -rw-r--r-- | scene/gui/popup_menu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index ec9e2cacb4..0cda27ec24 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1487,6 +1487,7 @@ void PopupMenu::add_icon_radio_check_shortcut(const Ref<Texture2D> &p_icon, cons } void PopupMenu::add_submenu_item(const String &p_label, const String &p_submenu, int p_id) { + ERR_FAIL_COND_MSG(p_submenu.validate_node_name() != p_submenu, "Invalid node name for submenu, the following characters are not allowed:\n" + String::get_invalid_node_name_characters()); Item item; item.text = p_label; item.xl_text = atr(p_label); |
