Merge pull request #17879 from xsellier/cherry-pick/queue_delete
Cherry pick/queue delete
This commit is contained in:
commit
92030e31fe
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue