瀏覽代碼

Merge pull request #79588 from magian1127/4.0Fix78052

Fix the error when clicking AnimationTree in the editor
Yuri Sizov 2 年之前
父節點
當前提交
1886dee28f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      editor/plugins/animation_tree_editor_plugin.cpp

+ 2 - 1
editor/plugins/animation_tree_editor_plugin.cpp

@@ -241,7 +241,8 @@ bool AnimationTreeEditor::can_edit(const Ref<AnimationNode> &p_node) const {
 }
 
 Vector<String> AnimationTreeEditor::get_animation_list() {
-	if (!singleton->is_visible()) {
+	if (!singleton->tree || !singleton->is_visible()) {
+		// When tree is empty, singleton not in the main thread.
 		return Vector<String>();
 	}