Merge pull request #2389 from zhongwuzw/fix-nullable-5.x
Fix nullable key when get image load operation
This commit is contained in:
commit
56a8684e64
|
@ -31,9 +31,11 @@ typedef NSMapTable<NSString *, id<SDWebImageOperation>> SDOperationsDictionary;
|
|||
|
||||
- (nullable id<SDWebImageOperation>)sd_imageLoadOperationForKey:(nullable NSString *)key {
|
||||
id<SDWebImageOperation> operation;
|
||||
SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
|
||||
@synchronized (self) {
|
||||
operation = [operationDictionary objectForKey:key];
|
||||
if (key) {
|
||||
SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
|
||||
@synchronized (self) {
|
||||
operation = [operationDictionary objectForKey:key];
|
||||
}
|
||||
}
|
||||
return operation;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue