From 1e78a5b2f976dc66db6673a98f4cb358dc65dc5e Mon Sep 17 00:00:00 2001 From: Patrick Hernandez Date: Wed, 11 Apr 2012 18:37:53 -0500 Subject: [PATCH] Fixed crash in special case for custom callback queues - Added a line for setting _successCallbackQueue to NULL when releasing the call back queue in the setter - Added a line for setting _failureCallbackQueue to NULL when releasing the call back queue in the setter --- AFNetworking/AFHTTPRequestOperation.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AFNetworking/AFHTTPRequestOperation.m b/AFNetworking/AFHTTPRequestOperation.m index 871cb18..5e1dce9 100644 --- a/AFNetworking/AFHTTPRequestOperation.m +++ b/AFNetworking/AFHTTPRequestOperation.m @@ -135,6 +135,7 @@ static NSString * AFStringFromIndexSet(NSIndexSet *indexSet) { if (successCallbackQueue != _successCallbackQueue) { if (_successCallbackQueue) { dispatch_release(_successCallbackQueue); + _successCallbackQueue = NULL; } if (successCallbackQueue) { @@ -148,6 +149,7 @@ static NSString * AFStringFromIndexSet(NSIndexSet *indexSet) { if (failureCallbackQueue != _failureCallbackQueue) { if (_failureCallbackQueue) { dispatch_release(_failureCallbackQueue); + _failureCallbackQueue = NULL; } if (failureCallbackQueue) {