diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-09 21:59:56 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-05-09 21:59:56 +0000 |
commit | 757cdc4e7399da991b2881f367249424124da895 (patch) | |
tree | e2b9391729c359bef12e9c7084439cf869fd0479 | |
parent | 87ec860f3899b41fcc465bd6ceb2e940eb2442f9 (diff) |
check for missing filename (needs to be specified when tool is launched)
git-svn-id: http://skia.googlecode.com/svn/trunk@1287 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | bench/DecodeBench.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp index 6abd05456f..ac11089784 100644 --- a/bench/DecodeBench.cpp +++ b/bench/DecodeBench.cpp @@ -33,10 +33,12 @@ protected: } virtual void onDraw(SkCanvas* canvas) { - for (int i = 0; i < N; i++) { - SkBitmap bm; - SkImageDecoder::DecodeFile(fFilename, &bm, fPrefConfig, - SkImageDecoder::kDecodePixels_Mode); + if (fFilename) { + for (int i = 0; i < N; i++) { + SkBitmap bm; + SkImageDecoder::DecodeFile(fFilename, &bm, fPrefConfig, + SkImageDecoder::kDecodePixels_Mode); + } } } |