summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorDualMatrix <piet.goris@gmail.com>2018-10-11 01:30:12 +0200
committerDualMatrix <piet.goris@gmail.com>2018-10-11 01:30:12 +0200
commit6afedaa498e17274daa33253147f9da3c1f9696f (patch)
tree9550e390cb7d626e2f8d35f946196d6fc1830696 /scene
parentcff89fc4e4f2ceb577b5f7a119d98cb22d41ea44 (diff)
Fixed error when duplicating a scene which has connection
Fixed error when duplicating a scene which has connection
Diffstat (limited to 'scene')
-rw-r--r--scene/main/node.cpp2
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);
}
}