summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorJulian Offenhäuser <offenhaeuser@protonmail.com>2023-03-24 22:16:50 +0100
committerAndrew Kaster <andrewdkaster@gmail.com>2023-03-25 16:27:30 -0600
commit5deac3a7f509d98b9c936e37272fb0605daffba3 (patch)
tree01ebc9ad5710470198f4d8213e22674f96091cfa /Userland
parentfec7ccf020785f05d62e28d5ca609b04a1893c5b (diff)
downloadserenity-5deac3a7f509d98b9c936e37272fb0605daffba3.zip
LibPDF: Actually return an error when failing to load replacement fonts
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibPDF/Fonts/PDFFont.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp
index 30eccd2f81..0fe67792c4 100644
--- a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp
+++ b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp
@@ -85,7 +85,7 @@ PDFErrorOr<NonnullRefPtr<Gfx::Font>> PDFFont::replacement_for(StringView name, f
float point_size = (font_size * POINTS_PER_INCH) / DEFAULT_DPI;
auto font = Gfx::FontDatabase::the().get(font_family, font_variant, point_size);
if (!font)
- Error::internal_error("Failed to load {} {} at {}pt", font_family, font_variant, point_size);
+ return Error::internal_error("Failed to load {} {} at {}pt", font_family, font_variant, point_size);
return font.release_nonnull();
}