You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable
This commit is contained in:
@@ -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", "");
|
||||
|
||||
Reference in New Issue
Block a user