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

Unified Diff: gm/etc1bitmap.cpp

Issue 1567893002: Fix crash when ETC1 codec is not supported. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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: gm/etc1bitmap.cpp
diff --git a/gm/etc1bitmap.cpp b/gm/etc1bitmap.cpp
index d9b08d1e8642c34af15f84f2ab1546d9583ee950..6b3b3aff17f93947c7f6a3c46a0e577b7f7c3003 100644
--- a/gm/etc1bitmap.cpp
+++ b/gm/etc1bitmap.cpp
@@ -105,7 +105,9 @@ protected:
}
SkAutoTUnref<SkImage> image(SkImage::NewFromEncoded(fileData));
- canvas->drawImage(image, 0, 0);
+ if (image) {
djsollen 2016/01/07 14:59:19 should we print a debug statement if image == null
+ canvas->drawImage(image, 0, 0);
+ }
}
private:
« 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