Mercurial > octave
changeset 31683:74c18a1f357b stable
Fix crash in GUI editor when using MRU list item which has been deleted (bug #63548)
* file-editor.cc (request_open_file): Check whether tab is being reused
("unnamed" buffer) and only delete FileEditorTab if it is not.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 22 Dec 2022 21:29:53 -0800 |
parents | abf3fb221090 |
children | 1f6bdbb5531b 601e7a142a15 |
files | libgui/src/m-editor/file-editor.cc |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc Thu Dec 22 19:12:57 2022 +0100 +++ b/libgui/src/m-editor/file-editor.cc Thu Dec 22 21:29:53 2022 -0800 @@ -1652,8 +1652,11 @@ } else { - delete fileEditorTab; - fileEditorTab = nullptr; + if (! reusing) + { + delete fileEditorTab; + fileEditorTab = nullptr; + } if (QFile::exists (openFileName)) {