mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 02:56:10 +00:00
LibPDF: Make image creation in Renderer::load_image() fallible
This commit is contained in:
parent
9bff8abcc7
commit
c6b484a728
Notes:
sideshowbarker
2024-07-17 02:56:25 +09:00
Author: https://github.com/nico
Commit: c6b484a728
Pull-request: https://github.com/SerenityOS/serenity/pull/23420
Reviewed-by: https://github.com/LucasChollet
1 changed files with 1 additions and 1 deletions
|
@ -1192,7 +1192,7 @@ PDFErrorOr<Renderer::LoadedImage> Renderer::load_image(NonnullRefPtr<StreamObjec
|
|||
component_value_decoders.empend(0.0f, 255.0f, dmin, dmax);
|
||||
}
|
||||
|
||||
auto bitmap = MUST(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, { width, height }));
|
||||
auto bitmap = TRY(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, { width, height }));
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
auto const bytes_per_component = bits_per_component / 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue