aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ColorSpaceTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp
index 37785e238b..0774a095a7 100644
--- a/tests/ColorSpaceTest.cpp
+++ b/tests/ColorSpaceTest.cpp
@@ -57,9 +57,15 @@ DEF_TEST(ColorSpaceParsePngICCProfile, r) {
DEF_TEST(ColorSpaceParseJpegICCProfile, r) {
SkAutoTDelete<SkStream> stream(resource("icc-v2-gbr.jpg"));
REPORTER_ASSERT(r, nullptr != stream);
+ if (!stream) {
+ return;
+ }
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
REPORTER_ASSERT(r, nullptr != codec);
+ if (!codec) {
+ return;
+ }
SkColorSpace* colorSpace = codec->getColorSpace();
REPORTER_ASSERT(r, nullptr != colorSpace);