Index: tests/PixelRefTest.cpp |
diff --git a/tests/PixelRefTest.cpp b/tests/PixelRefTest.cpp |
index c0bdf54c25cb4d21202083f0659388df1efccdd4..aeb3070eac054623fc894a450873a295a7b5f4cd 100644 |
--- a/tests/PixelRefTest.cpp |
+++ b/tests/PixelRefTest.cpp |
@@ -30,7 +30,7 @@ static void test_info(skiatest::Reporter* reporter) { |
REPORTER_ASSERT(reporter, success); |
success = bitmap.asImageInfo(&info); |
REPORTER_ASSERT(reporter, success == gRec[i].fExpectedSuccess); |
- if (gRec[i].fExpectedSuccess) { |
+ if (success && gRec[i].fExpectedSuccess) { |
REPORTER_ASSERT(reporter, info.fAlphaType == gRec[i].fAlphaType); |
REPORTER_ASSERT(reporter, info.fColorType == gRec[i].fExpectedColorType); |
} |