diff options
-rw-r--r-- | gm/cmykjpeg.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gm/cmykjpeg.cpp b/gm/cmykjpeg.cpp index 1d64d1c871..b0b175bdcc 100644 --- a/gm/cmykjpeg.cpp +++ b/gm/cmykjpeg.cpp @@ -34,6 +34,11 @@ protected: filename.append("CMYK.jpg"); SkFILEStream stream(filename.c_str()); + if (!stream.isValid()) { + SkDebugf("Could not find CMYK.jpg, please set --resourcePath correctly.\n"); + return; + } + SkImageDecoder* codec = SkImageDecoder::Factory(&stream); if (codec) { stream.rewind(); |