Skip to content

Commit

Permalink
Fixes nil responseBlock exc_bad_access
Browse files Browse the repository at this point in the history
  • Loading branch information
Josip Bernat committed Apr 29, 2014
1 parent 185b8e9 commit 84f08de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion JBMessage/JBMessage/JBMessage.m
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ - (void)receivedResponse:(id)result error:(NSError *)error {
}

dispatch_async(dispatch_get_main_queue(), ^{
self.responseBlock(parsedObject, error);
if (self.responseBlock) {
self.responseBlock(parsedObject, error);
}
});

[self operationDidFinish];
Expand Down

0 comments on commit 84f08de

Please sign in to comment.