From a33cf3b6bff3e9092aa305369c48a55a241c0f6e Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Wed, 25 Oct 2023 17:45:01 +0200 Subject: [PATCH] Ensure input event is valid in `PopupMenu::activate_item_by_event` (cherry picked from commit f721b34b4edbab0f88cd2aa671f1231b11aa26af) --- scene/gui/popup_menu.cpp | 1 + 1 file changed, 1 insertion(+) 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;