diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-24 01:19:34 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-24 01:19:34 +0100 |
commit | 1d4907243e7dacd5a9200e5537ea7e4e8fb1af98 (patch) | |
tree | ee663dbab0f96317eb674537d0cb07cb147f487c /scene/main/node.cpp | |
parent | c258da378b9b297d1df08c8aa2b97301c4b84bc7 (diff) | |
parent | b9bade8db1bf0445ce879ba6e1823d8266e60b2d (diff) | |
download | redot-engine-1d4907243e7dacd5a9200e5537ea7e4e8fb1af98.tar.gz |
Merge pull request #89628 from twobitadder/whoops_no_internals_pls
Fix crash on `reparent()` with Node containing internal children
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r-- | scene/main/node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 142736e388..9e35d29dc8 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -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) { |