Importing an empty array causes a crash #654

BarryBatser opened this Issue Jan 29, 2014 · 2 comments

2 participants


When trying to import a empty array, it causes a crash because it is trying to fetch it later on.


In file: NSManagedObject+MagicalDataImport.m, paste this after line 173. It checks if the object is null, but not if its an array, and if, if it is empty.

    if ([relatedObjectData isKindOfClass:[NSArray class]] && ((NSArray*)relatedObjectData).count == 0) {

Would you mind posting some sample data that demonstrates this problem? I'd love to write up a test for it and fix the issue properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment