Browse Source

Merge pull request #47442 from Shatur/fix-connect-reference-counted

Rémi Verschelde 3 years ago
parent
commit
01cb4d92f3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/object/object.cpp

+ 1 - 1
core/object/object.cpp

@@ -1409,7 +1409,7 @@ void Object::_disconnect(const StringName &p_signal, const Callable &p_callable,
 
 	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;
 		}
 	}