From b76b28f4b3253f32d7025d2dc55a05af1dd3daf8 Mon Sep 17 00:00:00 2001 From: dismory Date: Wed, 25 Apr 2012 16:02:29 +0800 Subject: [PATCH] Fix the duplicated `AFJSONDecode()` calling that cause message sending to deallocated `NSError` object --- AFNetworking/AFJSONRequestOperation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AFNetworking/AFJSONRequestOperation.m b/AFNetworking/AFJSONRequestOperation.m index 9d40368..bcdcb7f 100644 --- a/AFNetworking/AFJSONRequestOperation.m +++ b/AFNetworking/AFJSONRequestOperation.m @@ -66,7 +66,7 @@ static dispatch_queue_t json_request_operation_processing_queue() { } - (id)responseJSON { - if (!_responseJSON && [self.responseData length] > 0 && [self isFinished]) { + if (!_responseJSON && [self.responseData length] > 0 && [self isFinished] && !self.JSONError) { NSError *error = nil; if ([self.responseData length] == 0) {