summaryrefslogtreecommitdiff
path: root/src/modules/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/database')
-rw-r--r--src/modules/database/mdatabasecache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/database/mdatabasecache.cpp b/src/modules/database/mdatabasecache.cpp
index 6074d85bf9..30ad6beb3b 100644
--- a/src/modules/database/mdatabasecache.cpp
+++ b/src/modules/database/mdatabasecache.cpp
@@ -71,6 +71,8 @@ DBCachedContact* MDatabaseCache::AddContactToCache(HANDLE hContact)
DBCachedContact* MDatabaseCache::GetCachedContact(HANDLE hContact)
{
+ mir_cslock lck(m_cs);
+
int index = m_lContacts.getIndex((DBCachedContact*)&hContact);
return (index == -1) ? NULL : m_lContacts[index];
}