Add an assert to prevent weird errors.

This commit is contained in:
Ray Fix
2012-01-07 12:42:34 -08:00
committed by Blake Watters
parent ab3ec5495f
commit 8ac6f66f99

View File

@@ -70,6 +70,7 @@
id collection = [[[[[value class] alloc] init] autorelease] mutableCopy];
for (id subObject in value) {
if ([subObject isKindOfClass:[NSManagedObjectID class]]) {
NSAssert(self.objectStore, @"Object store cannot be nil");
NSManagedObject* managedObject = [self.objectStore objectWithID:(NSManagedObjectID*)subObject];
[collection addObject:managedObject];
} else {