diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-04-19 14:29:53 +0430 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-04-19 16:28:33 +0200 |
commit | 74f0fdab9863970b9d06c083e50fba7093bf6d5e (patch) | |
tree | 1e834c7de1fb8c805298a44c219e6daba74eeb0f /Userland/Libraries | |
parent | e1e84fe0fef8a844bb54d07258c32e24ef1f96d5 (diff) | |
download | serenity-74f0fdab9863970b9d06c083e50fba7093bf6d5e.zip |
LibLine: Avoid trying to restore() if the editor isn't initialized
Fixes #6472.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibLine/Editor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index 0f0a12b184..8d4dfa54d5 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -600,7 +600,9 @@ void Editor::really_quit_event_loop() m_buffer.clear(); m_chars_touched_in_the_middle = buffer().size(); m_is_editing = false; - restore(); + + if (m_initialized) + restore(); m_returned_line = string; |