| Index: tests/PictureTest.cpp
|
| diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
|
| index 49bc57b1af29960e5cafa0cc709440d2171f0559..1827fdcb5a28ceb0a33541825c58a0fe57914790 100644
|
| --- a/tests/PictureTest.cpp
|
| +++ b/tests/PictureTest.cpp
|
| @@ -189,9 +189,11 @@ static void test_gatherpixelrefs(skiatest::Reporter* reporter) {
|
| 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, 1 == count);
|
| - REPORTER_ASSERT(reporter, *(SkPixelRef**)data->data() == refs[i]);
|
| + if (data) {
|
| + int count = data->size() / sizeof(SkPixelRef*);
|
| + REPORTER_ASSERT(reporter, 1 == count);
|
| + REPORTER_ASSERT(reporter, *(SkPixelRef**)data->data() == refs[i]);
|
| + }
|
| }
|
|
|
| // Test a bunch of random (mostly) rects, and compare the gather results
|
|
|