Avoid copying a signal with a Node if the target path is empty

This commit is contained in:
Sébastien Dunne Fulmer
2024-08-31 10:41:19 +01:00
parent ed108fc993
commit 7563c3a4df

View File

@ -2985,7 +2985,11 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
if (!target) {
continue;
}
NodePath ptarget = p_original->get_path_to(target);
if (ptarget.is_empty()) {
continue;
}
Node *copytarget = target;