diff --git a/core/input_map.cpp b/core/input_map.cpp index 36a0e88ae0a..ec833659f49 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -100,6 +100,7 @@ List InputMap::get_actions() const { } List >::Element *InputMap::_find_event(Action &p_action, const Ref &p_event, bool *p_pressed, float *p_strength) const { + ERR_FAIL_COND_V(!p_event.is_valid(), NULL); for (List >::Element *E = p_action.inputs.front(); E; E = E->next()) {