From 0abacae2d3102f5b32fb9d060b94d0095382a5df Mon Sep 17 00:00:00 2001 From: George Marques Date: Thu, 10 Dec 2020 17:15:00 -0300 Subject: [PATCH] Fix object check on Variant key checker --- core/variant/variant_setget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index 324adc01852..cee7465205d 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -1181,7 +1181,7 @@ struct VariantKeyedSetGetObject { static bool has(const Variant *base, const Variant *key, bool *r_valid) { Object *obj = base->get_validated_object(); - if (obj != nullptr) { + if (!obj) { *r_valid = false; return false; }