Skip to content

Commit c8434d9

Browse files
authored
fix(ios): add a null exception protection to imageView blur process (Tencent#4530)
1 parent 993e980 commit c8434d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

renderer/native/ios/renderer/component/image/HippyImageView.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ static BOOL HippyImageNeedsShrinkForSize(UIImage *inputImage, CGSize size) {
118118

119119
// copy image data
120120
dataSource = CGDataProviderCopyData(CGImageGetDataProvider(imageRef));
121+
if (dataSource == NULL) {
122+
return inputImage;
123+
}
121124
memcpy(buffer1.data, CFDataGetBytePtr(dataSource), bytes);
122125
CFRelease(dataSource);
123126
dataSource = NULL;

0 commit comments

Comments
 (0)