Authored by Lizhen Hu

Refactor in SDWebImageManager

@@ -314,10 +314,11 @@ @@ -314,10 +314,11 @@
314 } 314 }
315 315
316 - (void)safelyRemoveOperationFromRunning:(nullable SDWebImageCombinedOperation*)operation { 316 - (void)safelyRemoveOperationFromRunning:(nullable SDWebImageCombinedOperation*)operation {
317 - LOCK(self.runningOperationsLock);  
318 - if (operation) {  
319 - [self.runningOperations removeObject:operation]; 317 + if (!operation) {
  318 + return;
320 } 319 }
  320 + LOCK(self.runningOperationsLock);
  321 + [self.runningOperations removeObject:operation];
321 UNLOCK(self.runningOperationsLock); 322 UNLOCK(self.runningOperationsLock);
322 } 323 }
323 324