mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
LibWeb: Skip non-font files when looking for fonts instead of asserting
This commit is contained in:
parent
6c32882f05
commit
39a843470c
1 changed files with 3 additions and 1 deletions
|
@ -114,7 +114,9 @@ void StyleProperties::load_font() const
|
||||||
Core::DirIterator it { "/res/fonts/", Core::DirIterator::Flags::SkipDots };
|
Core::DirIterator it { "/res/fonts/", Core::DirIterator::Flags::SkipDots };
|
||||||
while (it.has_next()) {
|
while (it.has_next()) {
|
||||||
String name = it.next_path();
|
String name = it.next_path();
|
||||||
ASSERT(name.ends_with(".font"));
|
|
||||||
|
if (!name.ends_with(".font"))
|
||||||
|
continue;
|
||||||
if (!name.starts_with(expected_name))
|
if (!name.starts_with(expected_name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue