Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: tests/ColorSpaceTest.cpp

Issue 1840573004: Don't crash when resource path is omitted (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/ExifTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ColorSpaceTest.cpp
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp
index 0774a095a7c7f65d6886b55af27a76b883f96653..313eed86f118a9b9632f4c514baa5e21813dc801 100644
--- a/tests/ColorSpaceTest.cpp
+++ b/tests/ColorSpaceTest.cpp
@@ -24,6 +24,9 @@ static bool almost_equal(float a, float b) {
DEF_TEST(ColorSpaceParsePngICCProfile, r) {
SkAutoTDelete<SkStream> stream(resource("color_wheel_with_profile.png"));
REPORTER_ASSERT(r, nullptr != stream);
+ if (!stream) {
+ return;
+ }
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
REPORTER_ASSERT(r, nullptr != codec);
« no previous file with comments | « no previous file | tests/ExifTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698