summaryrefslogtreecommitdiff
path: root/core/reference.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/reference.h')
-rw-r--r--core/reference.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/reference.h b/core/reference.h
index 5fe8296314..bafc164276 100644
--- a/core/reference.h
+++ b/core/reference.h
@@ -51,7 +51,7 @@ protected:
public:
_FORCE_INLINE_ bool is_referenced() const { return refcount_init.get() < 1; }
bool init_ref();
- void reference();
+ bool reference(); // returns false if refcount is at zero and didn't get increased
bool unreference();
int reference_get_count() const;
@@ -62,7 +62,7 @@ public:
template <class T>
class Ref {
- T *reference;
+ T *reference = NULL;
void ref(const Ref &p_from) {