summaryrefslogtreecommitdiffstats
path: root/scene/gui
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-10-25 17:45:01 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2023-10-25 17:45:01 +0200
commitf721b34b4edbab0f88cd2aa671f1231b11aa26af (patch)
treea25ce15cc27f53b5296b714757cec919daac0f3e /scene/gui
parent06d51891678e3abf360d6fcd2e8bd1ba96704fcc (diff)
downloadredot-engine-f721b34b4edbab0f88cd2aa671f1231b11aa26af.tar.gz
Ensure input event is valid in `PopupMenu::activate_item_by_event`
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/popup_menu.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index dfaf7d88b7..ec9e2cacb4 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -2186,6 +2186,7 @@ void PopupMenu::scroll_to_item(int p_idx) {
}
bool PopupMenu::activate_item_by_event(const Ref<InputEvent> &p_event, bool p_for_global_only) {
+ ERR_FAIL_COND_V(p_event.is_null(), false);
Key code = Key::NONE;
Ref<InputEventKey> k = p_event;