summaryrefslogtreecommitdiff
path: root/core/variant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant.cpp')
-rw-r--r--core/variant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant.cpp b/core/variant.cpp
index 51c4b70bdc..e6a69edd08 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -1764,14 +1764,14 @@ Variant::operator Object *() const {
Variant::operator Node *() const {
if (type == OBJECT)
- return _get_obj().obj ? _get_obj().obj->cast_to<Node>() : NULL;
+ return Object::cast_to<Node>(_get_obj().obj);
else
return NULL;
}
Variant::operator Control *() const {
if (type == OBJECT)
- return _get_obj().obj ? _get_obj().obj->cast_to<Control>() : NULL;
+ return Object::cast_to<Control>(_get_obj().obj);
else
return NULL;
}