mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +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:
parent
1be830e3c6
commit
9725fd162f
4 changed files with 9 additions and 6 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue