Browse Source

Core: Fix `Freed Object` booleanization

Danil Alexeev 1 year ago
parent
commit
68481b6cdb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/variant/variant.cpp

+ 1 - 1
core/variant/variant.cpp

@@ -951,7 +951,7 @@ bool Variant::is_zero() const {
 			return *reinterpret_cast<const ::RID *>(_data._mem) == ::RID();
 		}
 		case OBJECT: {
-			return _get_obj().obj == nullptr;
+			return get_validated_object() == nullptr;
 		}
 		case CALLABLE: {
 			return reinterpret_cast<const Callable *>(_data._mem)->is_null();