fix cancelAll crash
This commit is contained in:
parent
2eef774eae
commit
3587b8d1e0
|
@ -283,8 +283,9 @@
|
|||
|
||||
- (void)cancelAll {
|
||||
@synchronized (self.runningOperations) {
|
||||
[self.runningOperations makeObjectsPerformSelector:@selector(cancel)];
|
||||
[self.runningOperations removeAllObjects];
|
||||
NSArray *copiedOperations = [self.runningOperations copy];
|
||||
[copiedOperations makeObjectsPerformSelector:@selector(cancel)];
|
||||
[self.runningOperations removeObjectsInArray:copiedOperations];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue