diff --git a/napi/settings/napi_settings_observer.cpp b/napi/settings/napi_settings_observer.cpp index f1ba72c1..03d70782 100644 --- a/napi/settings/napi_settings_observer.cpp +++ b/napi/settings/napi_settings_observer.cpp @@ -46,6 +46,7 @@ namespace Settings { } bool IsExistObserver(SettingsObserver* settingsObserver) { + std::lock_guard lockGuard(g_observerMapMutex); for (auto it = g_observerMap.begin(); it != g_observerMap.end(); ++it) { if (&(*(it->second)) == settingsObserver) { return true;