From d8351f12f2499bccc8754e748fdfa0122f79d8e1 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Tue, 28 Nov 2017 15:49:43 +0100 Subject: [PATCH] fixed unreachable code error --- MacPass/MPDocumentWindowController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MacPass/MPDocumentWindowController.m b/MacPass/MPDocumentWindowController.m index a527e3d1..96685d73 100644 --- a/MacPass/MPDocumentWindowController.m +++ b/MacPass/MPDocumentWindowController.m @@ -539,10 +539,10 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword); dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ [self editPasswordWithCompetionHandler:^(NSInteger result) { /* if password was changed, reset change key and dismiss */ - if(NSModalResponseOK == result) { + if(result == NSModalResponseOK) { document.tree.metaData.enforceMasterKeyChangeOnce = NO; } - else if(NSModalResponseCancel) { + else if(result == NSModalResponseCancel) { /* password was not changes, so keep nagging the user! */ [self _presentPasswordIntervalAlerts]; }