diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 3fc0f73a..dfd787d0 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -152,7 +152,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey return YES; // key is set, so autosave should be save } NSDictionary *userInfo = @{ NSLocalizedDescriptionKey: NSLocalizedString(@"NO_PASSWORD_OR_KEY_SET", "") }; - *outError = [NSError errorWithDomain:MPErrorDomain code:0 userInfo:userInfo]; + if(outError != NULL) { + *outError = [NSError errorWithDomain:MPErrorDomain code:0 userInfo:userInfo]; + } return NO; }