mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +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,6 +137,7 @@ FileDialog::Result FileDialog::open(QString const & path,
|
|||||||
FileDialog::Result result;
|
FileDialog::Result result;
|
||||||
FileDialog::Results results = openMulti(path, filters, suggested, false);
|
FileDialog::Results results = openMulti(path, filters, suggested, false);
|
||||||
result.first = results.first;
|
result.first = results.first;
|
||||||
|
if (result.first != FileDialog::Later)
|
||||||
result.second = results.second.at(0);
|
result.second = results.second.at(0);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user