Core: Fix Freed Object booleanization

This commit is contained in:
Danil Alexeev 2024-07-03 09:49:47 +03:00
parent 9425535602
commit 68481b6cdb
No known key found for this signature in database
GPG Key ID: 124453E157DA8DC7

View File

@ -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();