summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-04-13 19:47:16 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-04-13 19:47:21 +0300
commitd66399cf623b9d2b3407327069fa67bd81cde43c (patch)
treeb60cf369cc1ccf34a2843f73f92c2d0eea0c1541 /src
parent95b45e570a1acfc3a213a20298e2806ba8bf9c3f (diff)
MDatabaseCache: additional lock for global settings array
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/mdatabasecache.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mir_app/src/mdatabasecache.cpp b/src/mir_app/src/mdatabasecache.cpp
index 9f769a1f7b..5fffa1d553 100644
--- a/src/mir_app/src/mdatabasecache.cpp
+++ b/src/mir_app/src/mdatabasecache.cpp
@@ -143,6 +143,7 @@ char* MDatabaseCache::GetCachedSetting(const char *szModuleName, const char *szS
if (m_lastSetting && !mir_strcmp(szKey, m_lastSetting))
return m_lastSetting;
+ mir_cslock lck(m_csVal);
int index = m_lSettings.getIndex((char*)szKey);
if (index != -1)
m_lastSetting = m_lSettings[index];