mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Fix use of WebPGetFeatures's returned status
This commit is contained in:
parent
ac1024f5d3
commit
0bf62c4545
@ -42,11 +42,10 @@ os::SurfaceRef decode_webp(const uint8_t* buf, uint32_t len)
|
||||
|
||||
WebPDecoderConfig config;
|
||||
WebPInitDecoderConfig(&config);
|
||||
if (WebPGetFeatures(webp_data.bytes, webp_data.size, &config.input)) {
|
||||
|
||||
}
|
||||
else {
|
||||
config.input.has_alpha = false;
|
||||
auto status = WebPGetFeatures(webp_data.bytes, webp_data.size, &config.input);
|
||||
if (status != VP8_STATUS_OK) {
|
||||
// Error getting WebP features.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const int w = anim_info.canvas_width;
|
||||
|
Loading…
x
Reference in New Issue
Block a user