From 8ebefc8cf4b8f6861c88e39670f5c6b7c0cad22f Mon Sep 17 00:00:00 2001 From: Shatur95 Date: Sun, 28 Mar 2021 20:00:13 +0300 Subject: [PATCH] Fix CONNECT_REFERENCE_COUNTED (cherry picked from commit e5a086fde62dfb2936ab3dec2087520c7f41c96a) --- core/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/object.cpp b/core/object.cpp index 2802b6c537d..424e7c3a258 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1540,7 +1540,7 @@ void Object::_disconnect(const StringName &p_signal, Object *p_to_object, const if (!p_force) { slot->reference_count--; // by default is zero, if it was not referenced it will go below it - if (slot->reference_count >= 0) { + if (slot->reference_count > 0) { return; } }