diff --git a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp index 30eccd2f815..0fe67792c47 100644 --- a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp +++ b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp @@ -85,7 +85,7 @@ PDFErrorOr> 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(); }