diff --git a/Classes/ASIHTTPRequest.m b/Classes/ASIHTTPRequest.m index ae963e84..6f3eb8f7 100644 --- a/Classes/ASIHTTPRequest.m +++ b/Classes/ASIHTTPRequest.m @@ -1718,6 +1718,12 @@ - (void)failWithError:(NSError *)theError [failedRequest reportFailure]; + if (!inProgress) + { + // if we're not in progress, we can't notify the queue we've finished (doing so can cause a crash later on) + // "markAsFinished" will be at the start of main() when we are started + return; + } // markAsFinished may well cause this object to be dealloced [self retain]; [self markAsFinished];