Index: tests/PictureTest.cpp |
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp |
index 49bc57b1af29960e5cafa0cc709440d2171f0559..99082ea35203d50c7669983c1cdcc75a148c5760 100644 |
--- a/tests/PictureTest.cpp |
+++ b/tests/PictureTest.cpp |
@@ -188,10 +188,10 @@ static void test_gatherpixelrefs(skiatest::Reporter* reporter) { |
r.set(2, 2, W - 2, H - 2); |
r.offset(pos[i].fX, pos[i].fY); |
SkAutoDataUnref data(SkPictureUtils::GatherPixelRefs(pic, r)); |
- REPORTER_ASSERT(reporter, data); |
- int count = data->size() / sizeof(SkPixelRef*); |
+ REPORTER_ASSERT(reporter, NULL != data); |
reed1
2013/07/09 14:28:14
If we're going to do nothing if data is NULL, it t
tomhudson
2013/07/09 14:57:37
Done.
|
+ int count = data ? data->size() / sizeof(SkPixelRef*) : 0; |
REPORTER_ASSERT(reporter, 1 == count); |
- REPORTER_ASSERT(reporter, *(SkPixelRef**)data->data() == refs[i]); |
+ REPORTER_ASSERT(reporter, data && *(SkPixelRef**)data->data() == refs[i]); |
} |
// Test a bunch of random (mostly) rects, and compare the gather results |