From 38a9c911e744be9b226afbc5a71b959f63557e70 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 2 Apr 2018 12:47:49 +0300 Subject: fixes #1239 (MDBX: crash on "dbmodulechain.cpp (45): CDbxMDBX::GetModuleID" after MSN plugin login and new messages added) --- plugins/Dbx_mdbx/src/dbmodulechain.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 }; -- cgit v1.2.3