If the sd_imageURL of the UIImageView or UIButton is nil, won't create a NSError Instance
This commit is contained in:
parent
6a623cd58f
commit
47115e2593
|
@ -57,8 +57,8 @@ static char imageURLStorageKey;
|
||||||
[self.imageURLStorage removeObjectForKey:@(state)];
|
[self.imageURLStorage removeObjectForKey:@(state)];
|
||||||
|
|
||||||
dispatch_main_async_safe(^{
|
dispatch_main_async_safe(^{
|
||||||
NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}];
|
|
||||||
if (completedBlock) {
|
if (completedBlock) {
|
||||||
|
NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}];
|
||||||
completedBlock(nil, error, SDImageCacheTypeNone, url);
|
completedBlock(nil, error, SDImageCacheTypeNone, url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -87,8 +87,8 @@ static char TAG_ACTIVITY_SHOW;
|
||||||
} else {
|
} else {
|
||||||
dispatch_main_async_safe(^{
|
dispatch_main_async_safe(^{
|
||||||
[self removeActivityIndicator];
|
[self removeActivityIndicator];
|
||||||
NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}];
|
|
||||||
if (completedBlock) {
|
if (completedBlock) {
|
||||||
|
NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}];
|
||||||
completedBlock(nil, error, SDImageCacheTypeNone, url);
|
completedBlock(nil, error, SDImageCacheTypeNone, url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue