diff options
author | Tibor Nagy <xnagytibor@gmail.com> | 2020-03-11 18:13:46 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-11 21:27:03 +0100 |
commit | cebf6a7039eb33ef4a2b8d539bb73b330ca18cd2 (patch) | |
tree | 0ef49b69c9136d5d648cf0eeea37cc9e376ab0ae /Libraries/LibGUI | |
parent | 8d54e4e012e49e1bf75193c39e05095e8a78b4c9 (diff) | |
download | serenity-cebf6a7039eb33ef4a2b8d539bb73b330ca18cd2.zip |
LibGUI: Skip non-font files in the FontDatabase constructor
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/FontDatabase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibGUI/FontDatabase.cpp b/Libraries/LibGUI/FontDatabase.cpp index 7815cde43f..fd038588fe 100644 --- a/Libraries/LibGUI/FontDatabase.cpp +++ b/Libraries/LibGUI/FontDatabase.cpp @@ -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; |