| Index: cc/tiles/software_image_decode_cache.cc
|
| diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
|
| index c41e24024e3d87acb48c2c6046e747fe6e196e79..f84ed1d8997dc0310397ae9fe1bfaca2069c7b46 100644
|
| --- a/cc/tiles/software_image_decode_cache.cc
|
| +++ b/cc/tiles/software_image_decode_cache.cc
|
| @@ -587,7 +587,12 @@ SoftwareImageDecodeCache::GetOriginalSizeImageDecode(
|
| "color conversion");
|
| image = image->makeColorSpace(target_color_space,
|
| SkTransferFunctionBehavior::kIgnore);
|
| - DCHECK(image);
|
| + // Because image is a lazy-decode image, the call to makeColorSpace will
|
| + // fail if image decode fails.
|
| + if (!image) {
|
| + decoded_pixels->Unlock();
|
| + return nullptr;
|
| + }
|
| }
|
| {
|
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("cc.debug"),
|
|
|