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

Merge pull request #96076 from AThousandShips/improve_null_check_core_drivers

[Core,Drivers] Improve use of `Ref.is_null/valid`
This commit is contained in:
Thaddeus Crews
2024-12-23 11:14:58 -06:00
14 changed files with 37 additions and 37 deletions

View File

@@ -158,7 +158,7 @@ List<StringName> InputMap::get_actions() const {
}
List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool p_exact_match, bool *r_pressed, float *r_strength, float *r_raw_strength, int *r_event_index) const {
ERR_FAIL_COND_V(!p_event.is_valid(), nullptr);
ERR_FAIL_COND_V(p_event.is_null(), nullptr);
int i = 0;
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {