Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fixed crash in special case for custom callback queues
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
kirsplatrick committed Apr 11, 2012
1 parent a0967f5 commit 1e78a5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AFNetworking/AFHTTPRequestOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ - (void)setSuccessCallbackQueue:(dispatch_queue_t)successCallbackQueue {
if (successCallbackQueue != _successCallbackQueue) {
if (_successCallbackQueue) {
dispatch_release(_successCallbackQueue);
_successCallbackQueue = NULL;
}

if (successCallbackQueue) {
Expand All @@ -148,6 +149,7 @@ - (void)setFailureCallbackQueue:(dispatch_queue_t)failureCallbackQueue {
if (failureCallbackQueue != _failureCallbackQueue) {
if (_failureCallbackQueue) {
dispatch_release(_failureCallbackQueue);
_failureCallbackQueue = NULL;
}

if (failureCallbackQueue) {
Expand Down

0 comments on commit 1e78a5b

Please sign in to comment.