summaryrefslogtreecommitdiff
path: root/core/reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/reference.cpp')
-rw-r--r--core/reference.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/reference.cpp b/core/reference.cpp
index cc8a9854fb..d1dba0d9bf 100644
--- a/core/reference.cpp
+++ b/core/reference.cpp
@@ -103,12 +103,14 @@ Reference::Reference() :
}
Variant WeakRef::get_ref() const {
- if (ref.is_null())
+ if (ref.is_null()) {
return Variant();
+ }
Object *obj = ObjectDB::get_instance(ref);
- if (!obj)
+ if (!obj) {
return Variant();
+ }
Reference *r = cast_to<Reference>(obj);
if (r) {
return REF(r);