mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
FontEditor: Don't paint in GlyphEditorWidget if m_font is null
The font isn't set in the constructor, there may be a case where the font hasn't loaded before the first paint event. Therefore, we should not paint if the font is null. All other methods should be fine.
This commit is contained in:
@@ -31,6 +31,9 @@ void GlyphEditorWidget::set_glyph(int glyph)
|
||||
|
||||
void GlyphEditorWidget::paint_event(GUI::PaintEvent& event)
|
||||
{
|
||||
if (!m_font)
|
||||
return;
|
||||
|
||||
GUI::Frame::paint_event(event);
|
||||
|
||||
GUI::Painter painter(*this);
|
||||
|
||||
Reference in New Issue
Block a user