summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-02 12:47:49 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-02 12:47:49 +0300
commit38a9c911e744be9b226afbc5a71b959f63557e70 (patch)
treef348ead8a9b26067acfc22782cf8dfc6d5eda62b /plugins/Dbx_mdbx
parent47b3974219e8e93fedfefda2512223b722600ec5 (diff)
fixes #1239 (MDBX: crash on "dbmodulechain.cpp (45): CDbxMDBX::GetModuleID" after MSN plugin login and new messages added)
Diffstat (limited to 'plugins/Dbx_mdbx')
-rw-r--r--plugins/Dbx_mdbx/src/dbmodulechain.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Dbx_mdbx/src/dbmodulechain.cpp b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
index 0ab6b3eb58..442fe3d5e2 100644
--- a/plugins/Dbx_mdbx/src/dbmodulechain.cpp
+++ b/plugins/Dbx_mdbx/src/dbmodulechain.cpp
@@ -40,6 +40,9 @@ int CDbxMDBX::InitModules()
// will create the offset if it needs to
uint32_t CDbxMDBX::GetModuleID(const char *szName)
{
+ if (szName == nullptr)
+ return 0;
+
uint32_t iHash = mir_hashstr(szName);
if (m_Modules.find(iHash) == m_Modules.end()) {
MDBX_val key = { &iHash, sizeof(iHash) }, data = { (void*)szName, strlen(szName) + 1 };