diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 18c8ecbf..f32a7e4d 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -413,6 +413,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou */ // only lock if we do not have user interaction that cannot be dismissed! if(!self.lockedForFileChange) { + for(NSWindow *sheet in [self windowForSheet].sheets) { + [[self windowForSheet] endSheet:sheet]; + } [self saveDocumentWithDelegate:self didSaveSelector:@selector(_lockDatabaseForDocument:didSave:contextInfo:) contextInfo:NULL]; } }