mirror of https://github.com/godotengine/godot
add checks for node type range in add_node function
This commit is contained in:
parent
30c69c296b
commit
1ca1b78a09
|
|
@ -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(p_type == NODE_OUTPUT);
|
||||||
ERR_FAIL_COND(node_map.has(p_node));
|
ERR_FAIL_COND(node_map.has(p_node));
|
||||||
|
ERR_FAIL_INDEX(p_type, NODE_MAX);
|
||||||
NodeBase *n = NULL;
|
NodeBase *n = NULL;
|
||||||
|
|
||||||
switch (p_type) {
|
switch (p_type) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue