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
parent 6e4d5b310f
commit de4b240429

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;
}
};