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

Unified Diff: tests/ExifTest.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 | « tests/ColorSpaceTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ExifTest.cpp
diff --git a/tests/ExifTest.cpp b/tests/ExifTest.cpp
index c49de0f6fe2ed9b2244a472d48306bce0f798558..7fcd8b861d66820ef80fb8fcb905981db02a17ff 100644
--- a/tests/ExifTest.cpp
+++ b/tests/ExifTest.cpp
@@ -17,6 +17,10 @@ static SkStreamAsset* resource(const char path[]) {
DEF_TEST(ExifOrientation, r) {
SkAutoTDelete<SkStream> stream(resource("exif-orientation-2-ur.jpg"));
REPORTER_ASSERT(r, nullptr != stream);
+ if (!stream) {
+ return;
+ }
+
SkAutoTDelete<SkCodec> codec(SkCodec::NewFromStream(stream.release()));
REPORTER_ASSERT(r, nullptr != codec);
SkCodec::Origin origin = codec->getOrigin();
« no previous file with comments | « tests/ColorSpaceTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698