Fix crash when ETC1 codec is not supported.
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
This commit is contained in:
parent
76a1225431
commit
19aa2b0867
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user