Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing rookie mistake :/

  • Loading branch information...
commit 72dc5a4179ccae82959155ee94c201dcd70c2965 1 parent a451eb4
@blackgold9 blackgold9 authored
2  MagicalRecord/Categories/NSManagedObjectContext/NSManagedObjectContext+MagicalRecord.m
@@ -173,7 +173,7 @@ - (void)contextWillSave:(NSNotification *)notification
if (context.insertedObjects.count > 0) {
NSArray *insertedObjects = [[context insertedObjects] allObjects];
MRLog(@"Context %@ is about to save. Obtaining permanent IDs for new %lu inserted objects", [context MR_description], (unsigned long)[insertedObjects count]);
- NSError *error;
+ NSError *error = nil;
[context obtainPermanentIDsForObjects:insertedObjects error:&error];
[MagicalRecord handleErrors:error];

4 comments on commit 72dc5a4


Under ARC, aren't variables automatically initialized to nil?


I wen't back and checked later. And they are. I started to doubt that because it crashed when I didn't, but now I realize that it was because I was doing it via cocoapods, and we didn't have the requires-arc flag set to true when installed that way.



Please sign in to comment.
Something went wrong with that request. Please try again.