Merge pull request #51890 from fabriceci/crash-animation-blend-tree

Fix 51889 that cause a crash when you click on an AnimationTree that contains an invalid node
This commit is contained in:
Rémi Verschelde 2021-08-19 20:46:33 +02:00 committed by GitHub
commit fb8487e011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,6 +126,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
graph->add_child(node);
Ref<AnimationNode> agnode = blend_tree->get_node(E);
ERR_CONTINUE(!agnode.is_valid());
node->set_position_offset(blend_tree->get_node_position(E) * EDSCALE);