Merge pull request #89628 from twobitadder/whoops_no_internals_pls

Fix crash on `reparent()` with Node containing internal children
This commit is contained in:
Rémi Verschelde 2024-03-24 01:19:34 +01:00
commit 1d4907243e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -1899,7 +1899,7 @@ void Node::reparent(Node *p_parent, bool p_keep_global_transform) {
Node *check = to_visit[to_visit.size() - 1];
to_visit.resize(to_visit.size() - 1);
for (int i = 0; i < check->get_child_count(); i++) {
for (int i = 0; i < check->get_child_count(false); i++) {
Node *child = check->get_child(i, false);
to_visit.push_back(child);
if (child->data.owner == owner_temp) {