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 {
|
- (nullable id<SDWebImageOperation>)sd_imageLoadOperationForKey:(nullable NSString *)key {
|
||||||
id<SDWebImageOperation> operation;
|
id<SDWebImageOperation> operation;
|
||||||
SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
|
if (key) {
|
||||||
@synchronized (self) {
|
SDOperationsDictionary *operationDictionary = [self sd_operationDictionary];
|
||||||
operation = [operationDictionary objectForKey:key];
|
@synchronized (self) {
|
||||||
|
operation = [operationDictionary objectForKey:key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return operation;
|
return operation;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue