summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src/dbevents.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp')
-rw-r--r--plugins/Dbx_sqlite/src/dbevents.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 3071373b5b..a376f9e8ca 100644
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -266,14 +266,17 @@ BOOL CDbxSQLite::EditEvent(MEVENT hDbEvent, const DBEVENTINFO *dbei)
DBEVENTINFO tmp = *dbei;
mir_ptr<char> pCryptBlob;
- if (m_bEncrypted && tmp.pBlob) {
- size_t len;
- char *pResult = (char*)m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
- if (pResult != nullptr) {
- pCryptBlob = tmp.pBlob = pResult;
- tmp.cbBlob = (uint16_t)len;
- tmp.flags |= DBEF_ENCRYPTED;
+ if (m_bEncrypted) {
+ if (tmp.pBlob) {
+ size_t len;
+ char *pResult = (char *)m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
+ if (pResult != nullptr) {
+ pCryptBlob = tmp.pBlob = pResult;
+ tmp.cbBlob = (uint16_t)len;
+ tmp.flags |= DBEF_ENCRYPTED;
+ }
}
+ else tmp.flags |= DBEF_ENCRYPTED;
}
mir_cslockfull lock(m_csDbAccess);