Skip to content

Commit

Permalink
Merge pull request #86745 from KoBeWi/internal_error
Browse files Browse the repository at this point in the history
Ignore internal children when replacing node
  • Loading branch information
akien-mga committed Jan 3, 2024
2 parents d4b33b3 + cd2edfe commit fbaab3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ void Node::replace_by(Node *p_node, bool p_keep_groups) {
}

Node *parent = data.parent;
int index_in_parent = get_index();
int index_in_parent = get_index(false);

if (data.parent) {
parent->remove_child(this);
Expand Down

0 comments on commit fbaab3c

Please sign in to comment.