1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 18:15:07 +00:00

LibGUI: Skip non-font files in the FontDatabase constructor

This commit is contained in:
Tibor Nagy 2020-03-11 18:13:46 +01:00 committed by Andreas Kling
parent 8d54e4e012
commit cebf6a7039

View file

@ -52,6 +52,9 @@ FontDatabase::FontDatabase()
}
while (di.has_next()) {
String name = di.next_path();
if (!name.ends_with(".font"))
continue;
auto path = String::format("/res/fonts/%s", name.characters());
if (auto font = Gfx::Font::load_from_file(path)) {
Metadata metadata;