Index: bench/ETCBitmapBench.cpp |
diff --git a/bench/ETCBitmapBench.cpp b/bench/ETCBitmapBench.cpp |
index aaa2ce7a6600411021cceb5213e7e26d85671505..e5ec44f2de820bdb4da78691a81f8e20714ccdb5 100644 |
--- a/bench/ETCBitmapBench.cpp |
+++ b/bench/ETCBitmapBench.cpp |
@@ -210,8 +210,11 @@ protected: |
} |
virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { |
+ SkPixelRef* pr = fBitmap.pixelRef(); |
for (int i = 0; i < loops; ++i) { |
- this->fBitmap.pixelRef()->notifyPixelsChanged(); |
+ if (pr) { |
+ pr->notifyPixelsChanged(); |
+ } |
canvas->drawBitmap(this->fBitmap, 0, 0, NULL); |
} |
} |