Merge pull request #838 from justjimmy/master
fix cancelAll crash (Issue #809)
This commit is contained in:
commit
044abf402d
|
@ -282,8 +282,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