Browse Source

Fix SafeNumeric::conditional_increment() for NO_THREADS

Pedro J. Estébanez 4 years ago
parent
commit
b1edb69249
1 changed files with 1 additions and 1 deletions
  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;