summaryrefslogtreecommitdiffstats
path: root/core/reference.h
diff options
context:
space:
mode:
authorhuisedenanhai <1728315644@qq.com>2019-09-04 00:04:37 +0800
committerhuisedenanhai <1728315644@qq.com>2019-09-04 12:17:07 +0800
commit124e51fdde79e2130dd10ba75f92e9c727166e0b (patch)
tree6d16887828a1414a1df498ed4ecc60bac6198cba /core/reference.h
parent5323d24fadadbc6c4a109a9848fd9c3ea08f4474 (diff)
downloadredot-engine-124e51fdde79e2130dd10ba75f92e9c727166e0b.tar.gz
make core/Reference thread safe
Diffstat (limited to 'core/reference.h')
-rw-r--r--core/reference.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/reference.h b/core/reference.h
index 20ee22ddfc..b8d00a94ad 100644
--- a/core/reference.h
+++ b/core/reference.h
@@ -47,7 +47,7 @@ protected:
static void _bind_methods();
public:
- _FORCE_INLINE_ bool is_referenced() const { return refcount_init.get() < 1; }
+ _FORCE_INLINE_ bool is_referenced() const { return refcount_init.get() != 1; }
bool init_ref();
bool reference(); // returns false if refcount is at zero and didn't get increased
bool unreference();