Skip to content

Commit 7563c3a

Browse files
committed
Avoid copying a signal with a Node if the target path is empty
1 parent ed108fc commit 7563c3a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scene/main/node.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,11 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
29852985
if (!target) {
29862986
continue;
29872987
}
2988+
29882989
NodePath ptarget = p_original->get_path_to(target);
2990+
if (ptarget.is_empty()) {
2991+
continue;
2992+
}
29892993

29902994
Node *copytarget = target;
29912995

0 commit comments

Comments
 (0)