diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0280258d9f0..82b7bd55dc5 100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1975,8 +1975,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 {