diff --git a/src/font/font_manager.cpp b/src/font/font_manager.cpp index 9da3b22b1..89d33df2b 100644 --- a/src/font/font_manager.cpp +++ b/src/font/font_manager.cpp @@ -308,7 +308,8 @@ void FontManager::shape(const std::u32string& text, std::vector* line_data) { - if (text.empty()) + // m_faces can be empty in null device + if (text.empty() || m_faces.empty()) return; auto lines = StringUtils::split(text, U'\n');