VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePasswordWizardPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms/VolumePasswordWizardPage.cpp')
-rw-r--r--src/Main/Forms/VolumePasswordWizardPage.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Main/Forms/VolumePasswordWizardPage.cpp b/src/Main/Forms/VolumePasswordWizardPage.cpp
index f90f275c..d2fa48ad 100644
--- a/src/Main/Forms/VolumePasswordWizardPage.cpp
+++ b/src/Main/Forms/VolumePasswordWizardPage.cpp
@@ -35,9 +35,16 @@ namespace VeraCrypt
if (ConfirmationMode && !PasswordPanel->PasswordsMatch())
return false;
- shared_ptr <KeyfileList> keyfiles (GetKeyfiles());
- shared_ptr <VolumePassword> password (GetPassword());
-
- return (password && !GetPassword()->IsEmpty()) || (keyfiles && !keyfiles->empty());
+ try
+ {
+ shared_ptr <KeyfileList> keyfiles (GetKeyfiles());
+ shared_ptr <VolumePassword> password (GetPassword());
+
+ return (password && !GetPassword()->IsEmpty()) || (keyfiles && !keyfiles->empty());
+ }
+ catch (PasswordException&)
+ {
+ return false;
+ }
}
}