From 757cdc4e7399da991b2881f367249424124da895 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 9 May 2011 21:59:56 +0000 Subject: 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 --- bench/DecodeBench.cpp | 10 ++++++---- 1 file 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); + } } } -- cgit v1.2.3