diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-16 21:24:53 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-16 21:24:53 +0200 |
commit | cdef53df1ed3f37cb77a69df4530bc766f2f1617 (patch) | |
tree | c55e2705e26eab60501e3d3499f6676975f5c5de /editor/plugins/animation_state_machine_editor.cpp | |
parent | 691eecd9b61994f0086a9aedfc5e5f058304aadf (diff) | |
parent | 75ee58fd0476360c67375cf403f06644a0aa117e (diff) | |
download | redot-engine-cdef53df1ed3f37cb77a69df4530bc766f2f1617.tar.gz |
Merge pull request #81705 from AThousandShips/null_check_editor
[Editor] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'editor/plugins/animation_state_machine_editor.cpp')
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 5e40a2f986..638838bcca 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -708,9 +708,9 @@ void AnimationNodeStateMachineEditor::_add_menu_type(int p_index) { String type = menu->get_item_metadata(p_index); Object *obj = ClassDB::instantiate(type); - ERR_FAIL_COND(!obj); + ERR_FAIL_NULL(obj); AnimationNode *an = Object::cast_to<AnimationNode>(obj); - ERR_FAIL_COND(!an); + ERR_FAIL_NULL(an); node = Ref<AnimationNode>(an); base_name = type.replace_first("AnimationNode", ""); |