summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfabriceci <fabricecipolla@gmail.com>2021-08-19 16:01:08 +0200
committerfabriceci <fabricecipolla@gmail.com>2021-08-19 16:05:35 +0200
commitf871f13340a2e1691674478570a62b69a5bf55a0 (patch)
treefdee394e301bc1dbe52db6de7773b4325f473be2
parent30a5cdc093346d1ccca67e0a1c755f19b8f6f909 (diff)
Avoid a crash when an node of the AnimationTree is invalid
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 69206daea8..030d90eeca 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -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);