diff --git a/source/shared_lib/include/platform/common/cache_manager.h b/source/shared_lib/include/platform/common/cache_manager.h index eca95615..3ed96bf3 100644 --- a/source/shared_lib/include/platform/common/cache_manager.h +++ b/source/shared_lib/include/platform/common/cache_manager.h @@ -51,7 +51,9 @@ protected: static Mutex mutexMap(CODE_AT_LINE); if(itemCacheMutexList.find(cacheKey) == itemCacheMutexList.end()) { MutexSafeWrapper safeMutex(&mutexMap); - itemCacheMutexList[cacheKey] = new Mutex(CODE_AT_LINE); + if(itemCacheMutexList.find(cacheKey) == itemCacheMutexList.end()) { + itemCacheMutexList[cacheKey] = new Mutex(CODE_AT_LINE); + } safeMutex.ReleaseLock(); } Mutex *mutex = itemCacheMutexList[cacheKey];