Explorar o código

Merge pull request #53519 from timothyqiu/anim-tree-null

Fix make sub-resource crash in AnimationTreeEditor
Rémi Verschelde %!s(int64=3) %!d(string=hai) anos
pai
achega
8afd2171d1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      editor/plugins/animation_tree_editor_plugin.cpp

+ 1 - 1
editor/plugins/animation_tree_editor_plugin.cpp

@@ -55,7 +55,7 @@ void AnimationTreeEditor::edit(AnimationTree *p_tree) {
 	tree = p_tree;
 
 	Vector<String> path;
-	if (tree->has_meta("_tree_edit_path")) {
+	if (tree && tree->has_meta("_tree_edit_path")) {
 		path = tree->get_meta("_tree_edit_path");
 		edit_path(path);
 	} else {