Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 88371a8e28fdf68e1e0e5e041588a3a475e4adc1..c7b389d36da4338ed55d38613966045c33f05f81 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -114,6 +114,10 @@ Error BRDSrc::draw(SkCanvas* canvas) const { |
return Error::Nonfatal(SkStringPrintf("Could not create brd for %s.", fPath.c_str())); |
} |
+ if (!brd->conversionSupported(colorType)) { |
+ return Error::Nonfatal("Cannot convert to color type.\n"); |
+ } |
+ |
const uint32_t width = brd->width(); |
const uint32_t height = brd->height(); |
// Visually inspecting very small output images is not necessary. |