mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 12:09:51 +00:00
Fix segfault when not saving new document
This commit is contained in:
parent
98e7f1a359
commit
94994590ac
@ -119,9 +119,11 @@ static int untitled_document_number = 0;
|
||||
- (void) _updateFileModificationDate {
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSString *path = [_fileURL path];
|
||||
NSDictionary *attributes = [fileManager fileAttributesAtPath: path
|
||||
traverseLink: YES];
|
||||
[self setFileModificationDate: attributes[NSFileModificationDate]];
|
||||
if (path != nil) {
|
||||
NSDictionary *attributes = [fileManager fileAttributesAtPath: path
|
||||
traverseLink: YES];
|
||||
[self setFileModificationDate: attributes[NSFileModificationDate]];
|
||||
}
|
||||
}
|
||||
|
||||
- (instancetype) initWithContentsOfURL: (NSURL *) url
|
||||
|
Loading…
Reference in New Issue
Block a user