From dc8e6e8503e08ad0c03f81d2624aa5d499dfe2be Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Wed, 29 May 2013 14:53:48 +0000 Subject: [PATCH] Fix cmykjpeg test to check if file was found. git-svn-id: http://skia.googlecode.com/svn/trunk@9314 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/cmykjpeg.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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();