未验证 提交 c2080ec7 编写于 作者: J Jason Simmons 提交者: GitHub

Check for null images in ImageFromCompressedData (#21891)

上级 ab8b2073
......@@ -105,7 +105,8 @@ sk_sp<SkImage> ImageFromCompressedData(fml::RefPtr<ImageDescriptor> descriptor,
if (!descriptor->should_resize(target_width, target_height)) {
// No resizing requested. Just decode & rasterize the image.
return descriptor->image()->makeRasterImage();
sk_sp<SkImage> image = descriptor->image();
return image ? image->makeRasterImage() : nullptr;
}
const SkISize source_dimensions = descriptor->image_info().dimensions();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册