Do not crash nanobench in debug mode

Instead print an error message

BUG=skia:

Review URL: https://codereview.chromium.org/1102083002
This commit is contained in:
msarett 2015-04-24 11:41:55 -07:00 committed by Commit bot
parent 91df6c273a
commit 9d9725c892

View File

@ -639,9 +639,9 @@ public:
const SkString& path = fImages[fCurrentCodec];
SkAutoTUnref<SkData> encoded(SkData::NewFromFileName(path.c_str()));
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
SkASSERT(codec);
if (!codec) {
// Nothing to time.
SkDebugf("Cannot find codec for %s\n", path.c_str());
continue;
}