diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-24 22:58:00 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-24 23:33:29 +0200 |
commit | c5f7a89b0f557c9540fa2c6af2cbb3a0fb5096a3 (patch) | |
tree | b61bf00295059a99d78486d03030422463e3d89a /core/variant | |
parent | 6296b46008fb8d8e5cb9b60af05fa1ea26b8f600 (diff) |
Core: Identity compare objects by id, not by pointers
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index 04e1561a0c..2da9559873 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -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: { |