From 36c8c1129b6baf5eb78394ac3c73b6de51c3f28e Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 6 May 2023 09:47:15 -0400 Subject: [PATCH] LibGfx/WebP: Use context.error() in animation frame decoding function That also sets the error state on the context. --- Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp index 455543effe..225cd55e3f 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp @@ -1562,7 +1562,7 @@ static ErrorOr decode_webp_animation_frame_image_data(WebPLoadingCont } if (chunk.type != FourCC("VP8 ") && chunk.type != FourCC("VP8L")) - return Error::from_string_literal("WebPImageDecoderPlugin: no image data found in animation frame"); + return context.error("WebPImageDecoderPlugin: no image data found in animation frame"); image_data.image_data_chunk = chunk;