Skip to content
Snippets Groups Projects
Commit 05ee09eb authored by George Nachman's avatar George Nachman
Browse files

Don't assert if the managed object model can't be initialized. Not sure why...

Don't assert if the managed object model can't be initialized. Not sure why this would happen (bundle corruption?), but it's a pointless crash.
parent 868a8787
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,6 +8,7 @@
 
#import "iTermShellHistoryController.h"
 
#import "DebugLogging.h"
#import "iTermCommandHistoryEntryMO+Additions.h"
#import "iTermDirectoryTree.h"
#import "iTermHostRecordMO.h"
Loading
Loading
@@ -162,7 +163,10 @@ static const NSTimeInterval kMaxTimeToRememberDirectories = 60 * 60 * 24 * 90;
 
NSManagedObjectModel *managedObjectModel =
[[[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL] autorelease];
assert(managedObjectModel);
if (!managedObjectModel) {
ELog(@"Failed to initialize managed object model for URL %@", modelURL);
return NO;
}
 
NSPersistentStoreCoordinator *persistentStoreCoordinator =
[[[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:managedObjectModel] autorelease];
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment