Skip to content

Commit

Permalink
LibPDF: Make image creation in Renderer::load_image() fallible
Browse files Browse the repository at this point in the history
  • Loading branch information
nico authored and trflynn89 committed Mar 3, 2024
1 parent 9bff8ab commit c6b484a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibPDF/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c6b484a

Please sign in to comment.