diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index a3be5d2b3..efa8107bd 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -2262,18 +2262,17 @@ namespace Shared { #ifndef _DISABLE_MEMORY_VAULT_CHECKS Checksum checksum; vaultList[ptr] = checksum.addInt(value); - #endif } void ValueCheckerVault::checkItemInVault(const void *ptr, int value) const { #ifndef _DISABLE_MEMORY_VAULT_CHECKS map::const_iterator iterFind = vaultList.find(ptr); - if (iterFind == vaultList.end()) - notifyValueChangedUnexpectedly(); - Checksum checksum; - if (iterFind->second != checksum.addInt(value)) - notifyValueChangedUnexpectedly(); + if (iterFind != vaultList.end()) { + Checksum checksum; + if (iterFind->second != checksum.addInt(value)) + notifyValueChangedUnexpectedly(); + } #endif }