diff --git a/core/safe_refcount.h b/core/safe_refcount.h index a61d227217f..7519329f2a5 100644 --- a/core/safe_refcount.h +++ b/core/safe_refcount.h @@ -249,7 +249,7 @@ public: } _ALWAYS_INLINE_ T conditional_increment() { - if (value != 0) { + if (value == 0) { return 0; } else { return ++value;