Fix nullable key when get image load operation
This commit is contained in:
parent
957de6d70f
commit
820f13ec93
|
@ -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