Check for null in InputMap::_find_event
This commit is contained in:
parent
9a463cb1d6
commit
f4e34ac353
1 changed files with 2 additions and 0 deletions
|
@ -95,6 +95,8 @@ List<StringName> InputMap::get_actions() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength) const {
|
List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength) const {
|
||||||
|
ERR_FAIL_COND_V(!p_event.is_valid(), nullptr);
|
||||||
|
|
||||||
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {
|
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {
|
||||||
const Ref<InputEvent> e = E->get();
|
const Ref<InputEvent> e = E->get();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue