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:
parent
8d54e4e012
commit
cebf6a7039
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue