mirror of https://github.com/godotengine/godot
Merge pull request #93885 from dalexeev/core-fix-freed-object-booleanization
Core: Fix `Freed Object` booleanization
This commit is contained in:
commit
f233d186ef
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue