Browse Source

Fix CONNECT_REFERENCE_COUNTED

(cherry picked from commit e5a086fde62dfb2936ab3dec2087520c7f41c96a)
Shatur95 4 years ago
parent
commit
8ebefc8cf4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/object.cpp

+ 1 - 1
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;
 		}
 	}