From 1a703c325453746befaadb54f7e76892691743b5 Mon Sep 17 00:00:00 2001 From: DualMatrix Date: Thu, 11 Oct 2018 01:30:12 +0200 Subject: [PATCH] Fixed error when duplicating a scene which has connection Fixed error when duplicating a scene which has connection (cherry picked from commit 6afedaa498e17274daa33253147f9da3c1f9696f) --- scene/main/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/node.cpp b/scene/main/node.cpp index c05d5af9557..6ec49348304 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2407,7 +2407,7 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const { if (!copytarget) copytarget = target; - 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); } }