diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-24 19:07:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 19:07:37 +0200 |
commit | 8c37c1e98dfc17fd27aebc7dd56b7579785d7bf9 (patch) | |
tree | 69d2583871a6686f566f77f89f1ca0fbf7b10239 /scene | |
parent | b41301e6f9cd978bed17e84a0f3c6d8cfec16c83 (diff) | |
parent | 6afedaa498e17274daa33253147f9da3c1f9696f (diff) |
Merge pull request #22920 from DualMatrix/error_already_connect
Fixed error when duplicating a scene which has connection
Diffstat (limited to 'scene')
-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 8fd7dc1d7b..50e94e6db5 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2192,7 +2192,7 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const { if (p_copy->has_node(ptarget)) copytarget = p_copy->get_node(ptarget); - if (copy && copytarget) { + if (copy && copytarget && !copy->is_connected(E->get().signal, copytarget, E->get().method)) { copy->connect(E->get().signal, copytarget, E->get().method, E->get().binds, E->get().flags); } } |