The callbacksForURL: method of SDWebImageDownloader now returns a copied array. This should fix the crash in multithread environment such as:

Collection <__NSArrayM: 0x226d9310> was mutated while being enumerated.
This commit is contained in:
Kevin Cador 2013-08-13 10:40:46 +02:00
parent fa987a1818
commit f356b86c29
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ static NSString *const kCompletedCallbackKey = @"completed";
{
callbacksForURL = self.URLCallbacks[url];
});
return callbacksForURL;
return [callbacksForURL copy];
}
- (void)removeCallbacksForURL:(NSURL *)url