From 1ca1b78a092a7073805d60598eb9938a775fbd3a Mon Sep 17 00:00:00 2001 From: Angad Kambli Date: Wed, 17 Feb 2021 14:22:50 +0530 Subject: [PATCH] add checks for node type range in add_node function --- scene/animation/animation_tree_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index fb9e21f81f..520840b514 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -926,7 +926,7 @@ void AnimationTreePlayer::add_node(NodeType p_type, const StringName &p_node) { ERR_FAIL_COND(p_type == NODE_OUTPUT); ERR_FAIL_COND(node_map.has(p_node)); - + ERR_FAIL_INDEX(p_type, NODE_MAX); NodeBase *n = NULL; switch (p_type) {