浏览代码

Fix CONNECT_REFERENCE_COUNTED

Shatur95 4 年之前
父节点
当前提交
e5a086fde6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/object/object.cpp

+ 1 - 1
core/object/object.cpp

@@ -1355,7 +1355,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;
 		}
 	}