mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASNetworkImageNode] Check that data is not nil before loading the animated image. (#1849)
This commit is contained in:
@@ -479,10 +479,12 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
||||
id<ASAnimatedImageProtocol> animatedImage = nil;
|
||||
if (_downloaderFlags.downloaderImplementsAnimatedImage) {
|
||||
NSData *data = [NSData dataWithContentsOfURL:_URL];
|
||||
animatedImage = [_downloader animatedImageWithData:data];
|
||||
if (data != nil) {
|
||||
animatedImage = [_downloader animatedImageWithData:data];
|
||||
|
||||
if ([animatedImage respondsToSelector:@selector(isDataSupported:)] && [animatedImage isDataSupported:data] == NO) {
|
||||
animatedImage = nil;
|
||||
if ([animatedImage respondsToSelector:@selector(isDataSupported:)] && [animatedImage isDataSupported:data] == NO) {
|
||||
animatedImage = nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user