mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGUI+Applications: Allow GlyphMapWidget's set_font() to fail
And TRY early during initialization in FontEditor to leave the app in a valid state on error. Fixes OOM crashes when cloning the original font for highlight modifications.
This commit is contained in:
committed by
Andreas Kling
parent
1be830e3c6
commit
9725fd162f
@@ -166,7 +166,8 @@ void CharacterMapWidget::initialize_menubar(GUI::Window& window)
|
||||
|
||||
void CharacterMapWidget::did_change_font()
|
||||
{
|
||||
m_glyph_map->set_font(font());
|
||||
// No need to track glyph modifications by cloning
|
||||
m_glyph_map->GUI::AbstractScrollableWidget::set_font(font());
|
||||
m_font_name_label->set_text(font().human_readable_name());
|
||||
m_output_box->set_font(font());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user