Authored by Bogdan Poplauschi

Merge pull request #985 from songfrank/master

Bug fix:Collection <__NSArrayM: > was mutated while being enumerated
@@ -253,7 +253,8 @@ BOOL ImageDataHasPNGPreffix(NSData *data) { @@ -253,7 +253,8 @@ BOOL ImageDataHasPNGPreffix(NSData *data) {
253 return data; 253 return data;
254 } 254 }
255 255
256 - for (NSString *path in self.customPaths) { 256 + NSArray *customPaths = [self.customPaths copy];
  257 + for (NSString *path in customPaths) {
257 NSString *filePath = [self cachePathForKey:key inPath:path]; 258 NSString *filePath = [self cachePathForKey:key inPath:path];
258 NSData *imageData = [NSData dataWithContentsOfFile:filePath]; 259 NSData *imageData = [NSData dataWithContentsOfFile:filePath];
259 if (imageData) { 260 if (imageData) {