From 2495eac17717120927a82a67fb9ad3055d9887e1 Mon Sep 17 00:00:00 2001 From: michael starke Date: Thu, 23 Nov 2017 08:19:55 +0100 Subject: [PATCH] Fixes a bug resutling in a reappering password change promt when the database is already lock (fixes #696) --- MacPass/MPDocumentWindowController.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index 072fd208..a527e3d1 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -342,7 +342,10 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword); } - (IBAction)lock:(id)sender { - MPDocument *document = [self document]; + MPDocument *document = self.document; + if(document.encrypted) { + return; // Document already locked + } if(!document.compositeKey) { [self editPasswordWithCompetionHandler:^(NSInteger result) { if(result == NSModalResponseOK) { @@ -351,9 +354,6 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword); }]; return; } - if(document.encrypted) { - return; // Document already locked - } [document lockDatabase:sender]; }