diff --git a/Userland/Applications/FontEditor/FontEditor.cpp b/Userland/Applications/FontEditor/FontEditor.cpp index fdc7906296..c5833aa7a2 100644 --- a/Userland/Applications/FontEditor/FontEditor.cpp +++ b/Userland/Applications/FontEditor/FontEditor.cpp @@ -622,7 +622,8 @@ ErrorOr FontEditorWidget::initialize(String const& path, RefPtrselection().start(), m_glyph_map_widget->selection().size(), m_glyph_map_widget->active_glyph(), *m_edited_font))); + auto selection = m_glyph_map_widget->selection().normalized(); + m_undo_selection = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) UndoSelection(selection.start(), selection.size(), m_glyph_map_widget->active_glyph(), *m_edited_font))); m_undo_stack->clear(); update_statusbar();