summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mdbx/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-09-21 20:01:02 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-09-21 20:01:02 +0300
commita2245d6446c46b5701190e957f56a42f038eea88 (patch)
treecaa60ef95e50d3eaa0e52b1674ef7d88a7f83539 /plugins/Dbx_mdbx/src
parent71b9f3c15e17154682980406a0d75cbe1d0d2525 (diff)
fix for profile encryption process
Diffstat (limited to 'plugins/Dbx_mdbx/src')
-rw-r--r--plugins/Dbx_mdbx/src/dbcrypt.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Dbx_mdbx/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp
index ccd65aef7a..233d0d1576 100644
--- a/plugins/Dbx_mdbx/src/dbcrypt.cpp
+++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp
@@ -188,9 +188,11 @@ int CDbxMDBX::EnableEncryption(bool bEncrypted)
MEVENT &hDbEvent = lstEvents[i];
MDBX_val key = { &hDbEvent, sizeof(MEVENT) }, data;
int rc = mdbx_get(txnro, m_dbEvents, &key, &data);
- /* FIXME: throw an exception */
- assert(rc == MDBX_SUCCESS);
- (void)rc;
+ if (rc != MDBX_SUCCESS) {
+ if (rc != MDBX_NOTFOUND)
+ assert(rc == MDBX_SUCCESS);
+ continue;
+ }
const DBEvent *dbEvent = (const DBEvent*)data.iov_base;
const BYTE *pBlob = (BYTE*)(dbEvent + 1);