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