1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix crash when switching to a different node from AnimationTree

This commit is contained in:
SaracenOne
2023-01-25 14:27:16 +00:00
parent 41e5f5b093
commit f424a748ff
2 changed files with 12 additions and 8 deletions

View File

@@ -65,13 +65,14 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) {
tree = p_tree;
Vector<String> path;
if (tree && tree->has_meta("_tree_edit_path")) {
path = tree->get_meta("_tree_edit_path");
} else {
current_root = ObjectID();
if (tree) {
if (tree->has_meta("_tree_edit_path")) {
path = tree->get_meta("_tree_edit_path");
} else {
current_root = ObjectID();
}
edit_path(path);
}
edit_path(path);
}
void AnimationTreeEditor::_node_removed(Node *p_node) {