projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76a1225
)
Fix crash when ETC1 codec is not supported.
author
djsollen
<djsollen@google.com>
Thu, 7 Jan 2016 15:22:47 +0000
(07:22 -0800)
committer
Commit bot
<commit-bot@chromium.org>
Thu, 7 Jan 2016 15:22:47 +0000
(07:22 -0800)
BUG=skia:4216
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1567893002
Review URL: https://codereview.chromium.org/
1567893002
gm/etc1bitmap.cpp
patch
|
blob
|
history
diff --git
a/gm/etc1bitmap.cpp
b/gm/etc1bitmap.cpp
index
d9b08d1
..
e2f6c2d
100644
(file)
--- 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);
}