From c5f7a89b0f557c9540fa2c6af2cbb3a0fb5096a3 Mon Sep 17 00:00:00 2001 From: Dmitrii Maganov Date: Fri, 24 Feb 2023 22:58:00 +0200 Subject: Core: Identity compare objects by id, not by pointers --- core/variant/variant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/variant') 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: { -- cgit v1.2.3