From 492804ca02dd69ceccae8322eb985bb8277071cc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 9 Jun 2020 11:54:00 +0300 Subject: fix for running the same dialog multiple times --- plugins/Dbx_mdbx/src/dbcrypt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/Dbx_mdbx/src') diff --git a/plugins/Dbx_mdbx/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp index 8c47a1a4d3..1b22fa6618 100644 --- a/plugins/Dbx_mdbx/src/dbcrypt.cpp +++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp @@ -233,8 +233,9 @@ int CDbxMDBX::InitCrypt() if (!m_crypto->setKey((const BYTE*)value.iov_base, value.iov_len)) { CEnterPasswordDialog dlg(this); while (true) { - if (!dlg.DoModal()) + if (dlg.DoModal() != IDOK) return 4; + m_crypto->setPassword(pass_ptrA(mir_utf8encodeW(dlg.m_newPass))); if (m_crypto->setKey((const BYTE*)value.iov_base, value.iov_len)) { m_bUsesPassword = true; -- cgit v1.2.3