From 39a843470c83f92dacaf0c21f1f67a1466f22eb0 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Wed, 11 Mar 2020 18:22:25 +0100 Subject: [PATCH] LibWeb: Skip non-font files when looking for fonts instead of asserting --- Libraries/LibWeb/CSS/StyleProperties.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/StyleProperties.cpp b/Libraries/LibWeb/CSS/StyleProperties.cpp index 42469062d0..8fb316fa26 100644 --- a/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -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;