Index: src/codec/SkJpegCodec.cpp |
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp |
index 92ab2bc1823bbc025bed055e24fbf1cf2618d83b..6863855d3b966ba5868d6d927eb17cb0b9897af5 100644 |
--- a/src/codec/SkJpegCodec.cpp |
+++ b/src/codec/SkJpegCodec.cpp |
@@ -412,7 +412,9 @@ bool SkJpegCodec::setOutputColorSpace(const SkImageInfo& dstInfo) { |
fDecoderMgr->dinfo()->out_color_space = JCS_GRAYSCALE; |
return true; |
case kRGBA_F16_SkColorType: |
- SkASSERT(fColorXform); |
+ if (!fColorXform) { |
+ return false; |
+ } |
if (!dstInfo.colorSpace()->gammaIsLinear()) { |
return false; |
} |
@@ -635,7 +637,6 @@ void SkJpegCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options& |
void SkJpegCodec::initializeColorXform(const SkImageInfo& dstInfo) { |
if (needs_color_xform(dstInfo, this->getInfo())) { |
fColorXform = SkColorSpaceXform::New(this->getInfo().colorSpace(), dstInfo.colorSpace()); |
- SkASSERT(fColorXform); |
} |
} |