Core: Identity compare objects by id, not by pointers
This commit is contained in:
parent
6296b46008
commit
c5f7a89b0f
2 changed files with 9 additions and 1 deletions
|
|
@ -3499,7 +3499,7 @@ bool Variant::identity_compare(const Variant &p_variant) const {
|
|||
|
||||
switch (type) {
|
||||
case OBJECT: {
|
||||
return _get_obj().obj == p_variant._get_obj().obj;
|
||||
return _get_obj().id == p_variant._get_obj().id;
|
||||
} break;
|
||||
|
||||
case DICTIONARY: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue