mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix unguarded unwrap when attempting to embed the same default font multiple times in the software renderer glyph embedding pass
Fixes #5684
This commit is contained in:
parent
c8a85b9dd9
commit
dafa559a55
1 changed files with 3 additions and 1 deletions
|
@ -275,7 +275,9 @@ fn embed_glyphs_with_fontdb<'a>(
|
|||
|
||||
// Make sure to embed the default font first, because that becomes the default at run-time.
|
||||
for path in default_font_paths {
|
||||
embed_font_by_path_and_face_id(&path, fonts.remove(&path).unwrap());
|
||||
if let Some(font_id) = fonts.remove(&path) {
|
||||
embed_font_by_path_and_face_id(&path, font_id);
|
||||
}
|
||||
}
|
||||
|
||||
for (path, face_id) in &fonts {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue