summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdb/src/dbmodulechain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_mdb/src/dbmodulechain.cpp')
-rw-r--r--plugins/Dbx_mdb/src/dbmodulechain.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Dbx_mdb/src/dbmodulechain.cpp b/plugins/Dbx_mdb/src/dbmodulechain.cpp
index 5b83d02804..b85388eeff 100644
--- a/plugins/Dbx_mdb/src/dbmodulechain.cpp
+++ b/plugins/Dbx_mdb/src/dbmodulechain.cpp
@@ -94,6 +94,8 @@ DWORD CDbxMdb::GetModuleNameOfs(const char *szName)
int nameLen = (int)strlen(szName);
+ mir_cslock lck(m_csDbAccess);
+
// need to create the module name
int newIdx = ++m_maxModuleID;
DBModuleName *pmod = (DBModuleName*)_alloca(sizeof(DBModuleName) + nameLen + 1);
@@ -133,8 +135,7 @@ STDMETHODIMP_(BOOL) CDbxMdb::EnumModuleNames(DBMODULEENUMPROC pFunc, void *pPara
{
for (int i = 0; i < m_lMods.getCount(); i++) {
ModuleName *pmn = m_lMods[i];
- int ret = pFunc(pmn->name, pmn->ofs, (LPARAM)pParam);
- if (ret)
+ if (int ret = pFunc(pmn->name, pmn->ofs, (LPARAM)pParam))
return ret;
}
return 0;