diff options
Diffstat (limited to 'Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp')
-rw-r--r-- | Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index 099d3179d7..9d97082a3b 100644 --- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -27,9 +27,8 @@ bool KeyboardMapperWidget::request_close() return true; auto result = GUI::MessageBox::ask_about_unsaved_changes(window(), m_filename); if (result == GUI::MessageBox::ExecResult::Yes) { - ErrorOr<void> error_or = save(); - if (error_or.is_error()) - show_error_to_user(error_or.error()); + if (auto error_or = save(); error_or.is_error()) + show_error_to_user(error_or.release_error()); if (!window()->is_modified()) return true; |