diff options
author | Rafał Mikrut <mikrutrafal@protonmail.com> | 2021-04-05 08:52:21 +0200 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal@protonmail.com> | 2021-04-05 08:52:21 +0200 |
commit | 504bc5cc6719db3bcafa5f1262b95fa2a58ec0a1 (patch) | |
tree | 4dc94056680fd757e2b99197c2c3518990755202 /scene/gui/popup_menu.cpp | |
parent | a864a703ee27065795c6297aaeb72ed753d0f279 (diff) |
Fix crashes in *_input functions
Diffstat (limited to 'scene/gui/popup_menu.cpp')
-rw-r--r-- | scene/gui/popup_menu.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index bfbd46a9f0..44df8eafdc 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -252,6 +252,8 @@ void PopupMenu::_submenu_timeout() { } void PopupMenu::_gui_input(const Ref<InputEvent> &p_event) { + ERR_FAIL_COND(p_event.is_null()); + if (p_event->is_action("ui_down") && p_event->is_pressed()) { int search_from = mouse_over + 1; if (search_from >= items.size()) { |