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

Unified Diff: tests/KtxTest.cpp

Issue 362833004: return early instead of crashing if fileData fails (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/KtxTest.cpp
diff --git a/tests/KtxTest.cpp b/tests/KtxTest.cpp
index 83a3546bec18281f134a0433dcaebb9704b9dad7..bddd09abbfe005665546eb4522237ce2bf49e50e 100644
--- a/tests/KtxTest.cpp
+++ b/tests/KtxTest.cpp
@@ -147,6 +147,9 @@ DEF_TEST(KtxReexportPKM, reporter) {
SkBitmap etcBitmap;
SkAutoTUnref<SkData> fileData(SkData::NewFromFileName(pkmFilename.c_str()));
REPORTER_ASSERT(reporter, NULL != fileData);
+ if (NULL == fileData) {
+ return;
+ }
bool installDiscardablePixelRefSuccess =
SkInstallDiscardablePixelRef(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698