summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx
diff options
context:
space:
mode:
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 };