diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 2c62aaf0..1a01edb2 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -279,12 +279,12 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou if(self.fileChangeDialogOpen) { return; // We are already displaying an alert } + /* Set the flag in this call! */ + self.fileChangeDialogOpen = YES; /* Dispatch the alert to the main queue */ dispatch_async(dispatch_get_main_queue(), ^{ - self.fileChangeDialogOpen = YES; - NSAlert *alert = [[NSAlert alloc] init]; alert.alertStyle = NSWarningAlertStyle; alert.messageText = NSLocalizedString(@"FILE_CHANGED_BY_OTHERS_MESSAGE_TEXT", @"Message displayed when an open file was changed from another application");