summaryrefslogtreecommitdiff
path: root/core/variant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant.cpp')
-rw-r--r--core/variant.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/variant.cpp b/core/variant.cpp
index 877e188809..1e09df98c7 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -1549,6 +1549,8 @@ Variant::operator uint64_t() const {
Variant::operator ObjectID() const {
if (type == INT) {
return ObjectID(_data._int);
+ } else if (type == OBJECT) {
+ return _get_obj().id;
} else {
return ObjectID();
}