From e06357e08f44b4537514ba1d97562e5e005ac8b4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 8 Jan 2021 11:59:49 +0300 Subject: crash fix --- src/mir_app/src/MDatabaseCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/MDatabaseCommon.cpp b/src/mir_app/src/MDatabaseCommon.cpp index 657b6a703b..d22c530517 100644 --- a/src/mir_app/src/MDatabaseCommon.cpp +++ b/src/mir_app/src/MDatabaseCommon.cpp @@ -502,7 +502,7 @@ STDMETHODIMP_(BOOL) MDatabaseCommon::WriteContactSetting(MCONTACT contactID, DBC return 1; dbcwWork.value.cchVal = (WORD)strlen(dbcwWork.value.pszVal); - if (bIsEncrypted) { + if (bIsEncrypted && m_crypto) { size_t len; BYTE *pResult = m_crypto->encodeString(dbcwWork.value.pszVal, &len); if (pResult != nullptr) { -- cgit v1.2.3