mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fix assertion when canceling file dialog
Without this patch, when a file has to be loaded (for example, after "Document->Settings->Local Class" or "Insert->Graphics") and the file dialog is canceled, both Qt5 and Qt6 assert: ASSERT failure in QList::at: "index out of range"
This commit is contained in:
parent
7eecab5902
commit
1cbcb30353
@ -137,7 +137,8 @@ FileDialog::Result FileDialog::open(QString const & path,
|
||||
FileDialog::Result result;
|
||||
FileDialog::Results results = openMulti(path, filters, suggested, false);
|
||||
result.first = results.first;
|
||||
result.second = results.second.at(0);
|
||||
if (result.first != FileDialog::Later)
|
||||
result.second = results.second.at(0);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user