diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 319f123da92..0ab41b40d81 100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2572,8 +2572,11 @@ void Node::print_stray_nodes() { void Node::queue_delete() { - ERR_FAIL_COND(!is_inside_tree()); - get_tree()->queue_delete(this); + if (is_inside_tree()) { + get_tree()->queue_delete(this); + } else { + SceneTree::get_singleton()->queue_delete(this); + } } Array Node::_get_children() const {