Index: gm/etc1bitmap.cpp |
diff --git a/gm/etc1bitmap.cpp b/gm/etc1bitmap.cpp |
index d9b08d1e8642c34af15f84f2ab1546d9583ee950..e2f6c2dc41b586fe955253366cedfee4f75a0416 100644 |
--- a/gm/etc1bitmap.cpp |
+++ b/gm/etc1bitmap.cpp |
@@ -105,6 +105,10 @@ protected: |
} |
SkAutoTUnref<SkImage> image(SkImage::NewFromEncoded(fileData)); |
+ if (nullptr == image) { |
+ SkDebugf("Could not decode the ETC file. ETC may not be included in this platform.\n"); |
+ return; |
+ } |
canvas->drawImage(image, 0, 0); |
} |