Merge pull request #17879 from xsellier/cherry-pick/queue_delete

Cherry pick/queue delete
This commit is contained in:
Rémi Verschelde 2018-04-03 11:07:04 +02:00 committed by GitHub
commit 92030e31fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1975,8 +1975,11 @@ void Node::print_stray_nodes() {
void Node::queue_delete() {
ERR_FAIL_COND(!is_inside_tree());
if (is_inside_tree()) {
get_tree()->queue_delete(this);
} else {
SceneTree::get_singleton()->queue_delete(this);
}
}
Array Node::_get_children() const {