diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-29 14:53:48 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-29 14:53:48 +0000 |
commit | dc8e6e8503e08ad0c03f81d2624aa5d499dfe2be (patch) | |
tree | d874847e70d33feecd540d62aa0826bdc812f905 | |
parent | 6cab1a4b6a68aa81237731308ff37a646d48f51c (diff) |
Fix cmykjpeg test to check if file was found.
git-svn-id: http://skia.googlecode.com/svn/trunk@9314 2bbb7eff-a529-9590-31e7-b0007b416f81
-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(); |