Fix crash when executing PopupMenu.new()._submenu_timeout()

This commit is contained in:
Haoyu Qiu 2021-07-27 11:59:54 +08:00
parent a71169c0e0
commit fb15adfad0

View file

@ -179,6 +179,8 @@ void PopupMenu::_activate_submenu(int over) {
} }
void PopupMenu::_submenu_timeout() { void PopupMenu::_submenu_timeout() {
ERR_FAIL_COND(submenu_over == -1);
if (mouse_over == submenu_over) { if (mouse_over == submenu_over) {
_activate_submenu(mouse_over); _activate_submenu(mouse_over);
} }