From a2245d6446c46b5701190e957f56a42f038eea88 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 21 Sep 2018 20:01:02 +0300 Subject: fix for profile encryption process --- plugins/Dbx_mdbx/src/dbcrypt.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins/Dbx_mdbx/src') 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); -- cgit v1.2.3