Merge pull request #73896 from vnen/object-null-boolean-consistency
Make freed object different than null in comparison operators
This commit is contained in:
commit
ca19d34bde
2 changed files with 17 additions and 17 deletions
|
|
@ -931,7 +931,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…
Add table
Add a link
Reference in a new issue