mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Skip non-font files when looking for fonts instead of asserting
This commit is contained in:
parent
6c32882f05
commit
39a843470c
Notes:
sideshowbarker
2024-07-19 08:46:12 +09:00
Author: https://github.com/xTibor Commit: https://github.com/SerenityOS/serenity/commit/39a843470c8 Pull-request: https://github.com/SerenityOS/serenity/pull/1417
@ -114,7 +114,9 @@ void StyleProperties::load_font() const
|
||||
Core::DirIterator it { "/res/fonts/", Core::DirIterator::Flags::SkipDots };
|
||||
while (it.has_next()) {
|
||||
String name = it.next_path();
|
||||
ASSERT(name.ends_with(".font"));
|
||||
|
||||
if (!name.ends_with(".font"))
|
||||
continue;
|
||||
if (!name.starts_with(expected_name))
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user