From 0b3c073c9ef44380ae2c8d12aed30c5d5535a4f7 Mon Sep 17 00:00:00 2001 From: Magian Date: Wed, 2 Aug 2023 22:45:09 +0800 Subject: [PATCH] Fix the error when clicking AnimationTree in the editor --- editor/plugins/animation_tree_editor_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index 9fa1e63dcb1..7b5f8aa7f77 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -241,7 +241,8 @@ bool AnimationTreeEditor::can_edit(const Ref &p_node) const { } Vector 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(); }