mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Revert "Make freed object different than null in comparison operators"
This reverts commit 150b50cfcd.
As discussed with the GDScript team, this has some implications which aren't
fully consensual yet, and which we want to revisit.
For now we revert to the 4.2 behavior for the 4.3 release, to avoid breaking
user expectations.
This commit is contained in:
@@ -951,7 +951,7 @@ bool Variant::is_zero() const {
|
||||
return *reinterpret_cast<const ::RID *>(_data._mem) == ::RID();
|
||||
}
|
||||
case OBJECT: {
|
||||
return get_validated_object() == nullptr;
|
||||
return _get_obj().obj == nullptr;
|
||||
}
|
||||
case CALLABLE: {
|
||||
return reinterpret_cast<const Callable *>(_data._mem)->is_null();
|
||||
|
||||
Reference in New Issue
Block a user