From 13d7404cd73f815e2cb68290b701f2978e6398d5 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Wed, 23 Sep 2020 15:39:06 +0200 Subject: [PATCH] Check for null in InputMap::_find_event (cherry picked from commit f4e34ac353b736708934abc3bf697fc45e53bbbb) --- core/input_map.cpp | 1 + 1 file changed, 1 insertion(+) 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()) {