From 6afedaa498e17274daa33253147f9da3c1f9696f Mon Sep 17 00:00:00 2001 From: DualMatrix Date: Thu, 11 Oct 2018 01:30:12 +0200 Subject: Fixed error when duplicating a scene which has connection Fixed error when duplicating a scene which has connection --- scene/main/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene') 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); } } -- cgit v1.2.3