mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Report error early
This commit is contained in:
parent
dbfcf2790c
commit
03a42480b1
@ -263,7 +263,9 @@ UIImage * _Nullable decompressImage(NSData * _Nonnull sourceData) {
|
|||||||
|
|
||||||
tjhandle _jpegDecompressor = tjInitDecompress();
|
tjhandle _jpegDecompressor = tjInitDecompress();
|
||||||
|
|
||||||
tjDecompressHeader2(_jpegDecompressor, _compressedImage, jpegSize, &width, &height, &jpegSubsamp);
|
if (tjDecompressHeader2(_jpegDecompressor, _compressedImage, jpegSize, &width, &height, &jpegSubsamp) != 0) {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
int sourceBytesPerRow = (3 * width + 31) & ~0x1F;
|
int sourceBytesPerRow = (3 * width + 31) & ~0x1F;
|
||||||
int targetBytesPerRow = (4 * width + 31) & ~0x1F;
|
int targetBytesPerRow = (4 * width + 31) & ~0x1F;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user