Skip to content

Commit

Permalink
Fixing a bug with nil response objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Stoll committed Apr 4, 2013
1 parent a8374ea commit 77e5fcc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/MMRecord/MMRecord.m
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,12 @@ + (NSArray*)recordsFromResponseObject:(id)responseObject
options:(MMRecordOptions *)options
state:(MMRecordRequestState *)state
context:(NSManagedObjectContext *)context {
if (responseObject == nil) {
[[self currentErrorHandler] handleFatalErrorCode:MMRecordErrorCodeInvalidResponseFormat
description:@"The response object should not be nil"];
return nil;
}

NSString *keyPathForResponseObject = options.keyPathForResponseObject;

if (state.batched) {
Expand Down

0 comments on commit 77e5fcc

Please sign in to comment.