From c6603763a3cdcb6d6ca0a8f7062bc0c1fd0e571f Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 1 Sep 2012 15:34:02 +0200 Subject: [PATCH] TGitCache: Guard access to m_entryCache Signed-off-by: Sven Strickroth --- src/TGitCache/CachedDirectory.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TGitCache/CachedDirectory.cpp b/src/TGitCache/CachedDirectory.cpp index ba9055097..489f65618 100644 --- a/src/TGitCache/CachedDirectory.cpp +++ b/src/TGitCache/CachedDirectory.cpp @@ -509,6 +509,7 @@ CCachedDirectory::AddEntry(const CTGitPath& path, const git_wc_status2_t* pGitSt if(!childDir) return ; + AutoLocker lock(childDir->m_critSec); CString cachekey = GetCacheKey(path); CacheEntryMap::iterator entry_it = childDir->m_entryCache.lower_bound(cachekey); if (entry_it != childDir->m_entryCache.end() && entry_it->first == cachekey) -- 2.11.4.GIT