Made sure we don't crash here if the operation is nil at some point
This commit is contained in:
parent
0c47bc3023
commit
a8ad2a5c4a
|
@ -31,8 +31,10 @@ typedef NSMutableDictionary<NSString *, id> SDOperationsDictionary;
|
|||
- (void)sd_setImageLoadOperation:(nullable id)operation forKey:(nullable NSString *)key {
|
||||
if (key) {
|
||||
[self sd_cancelImageLoadOperationWithKey:key];
|
||||
SDOperationsDictionary *operationDictionary = [self operationDictionary];
|
||||
operationDictionary[key] = operation;
|
||||
if (operation) {
|
||||
SDOperationsDictionary *operationDictionary = [self operationDictionary];
|
||||
operationDictionary[key] = operation;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue