diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e28af630ce5..67d77d48dbd 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1812,6 +1812,7 @@ void PopupMenu::scroll_to_item(int p_idx) { } bool PopupMenu::activate_item_by_event(const Ref &p_event, bool p_for_global_only) { + ERR_FAIL_COND_V(p_event.is_null(), false); Key code = Key::NONE; Ref k = p_event;