LibWeb: Add missing null check in font_with_point_size()

This commit is contained in:
Aliaksandr Kalenik 2023-12-13 18:39:25 +01:00 committed by Andreas Kling
commit de4b240429
Notes: sideshowbarker 2024-07-16 23:34:44 +09:00

View file

@ -208,7 +208,8 @@ struct StyleComputer::MatchingFontCandidate {
return font_list;
}
font_list->add(*loader_or_typeface.get<Gfx::Typeface const*>()->get_font(point_size));
if (auto font = loader_or_typeface.get<Gfx::Typeface const*>()->get_font(point_size))
font_list->add(*font);
return font_list;
}
};