浏览代码

Merge pull request #46424 from RandomShaper/fix_no_threads

Fix SafeNumeric::conditional_increment() for NO_THREADS
Rémi Verschelde 4 年之前
父节点
当前提交
f3f6c62b14
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/templates/safe_refcount.h

+ 1 - 1
core/templates/safe_refcount.h

@@ -249,7 +249,7 @@ public:
 	}
 
 	_ALWAYS_INLINE_ T conditional_increment() {
-		if (value != 0) {
+		if (value == 0) {
 			return 0;
 		} else {
 			return ++value;