mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibGfx: Don't return an error for webp sniff failures
The correct thing to do here is return false, returing an error crashes the ImageDecoder.
This commit is contained in:
parent
c696654294
commit
8d9cb538d6
1 changed files with 1 additions and 2 deletions
|
@ -526,8 +526,7 @@ ErrorOr<bool> WebPImageDecoderPlugin::sniff(ReadonlyBytes data)
|
|||
{
|
||||
WebPLoadingContext context;
|
||||
context.data = data;
|
||||
TRY(decode_webp_header(context));
|
||||
return true;
|
||||
return !decode_webp_header(context).is_error();
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> WebPImageDecoderPlugin::create(ReadonlyBytes data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue