1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-07 17:36:07 +00:00

Ensure input event is valid in PopupMenu::activate_item_by_event

(cherry picked from commit f721b34b4e)
This commit is contained in:
A Thousand Ships
2023-10-25 17:45:01 +02:00
committed by Yuri Sizov
parent a4912b8a63
commit a33cf3b6bf

View File

@@ -1812,6 +1812,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) { 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; Key code = Key::NONE;
Ref<InputEventKey> k = p_event; Ref<InputEventKey> k = p_event;