Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor.cc @ 19201:dddffa2ff413 gui-release
fix crash when mru list of editor is empty (regression from cset 12462638ab20)
* file-editor.cc (handle_mru_add_file): only check first element of mru
list if available
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 14 Aug 2014 09:16:16 +0200 |
parents | 724fc0a9eeb1 |
children | 63c5f95afeb3 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc +++ b/libgui/src/m-editor/file-editor.cc @@ -835,7 +835,7 @@ void file_editor::handle_mru_add_file (const QString& file_name) { - if (_mru_files.at (0) == file_name) + if (_mru_files.count () && _mru_files.at (0) == file_name) return; // the first entry is already the actual file name _mru_files.removeAll (file_name);