vcl/qt5/QtFilePicker.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 1d8253e4f036b187f4eed0548480c639448f604f Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Apr 27 23:19:55 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Apr 28 11:12:52 2025 +0200 tdf#166365: Crash in file picker, directory property (kf5/kf6) See bt from assertion here: https://bugs.documentfoundation.org/show_bug.cgi?id=166365#c1 Let's do the same as Gtk3KDE5FolderPicker::getDirectory() in vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx Change-Id: Iaea4e4b916c30cc14d3959725922c73e9d161625 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184691 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins (cherry picked from commit e77624db7f223ca1e487cea462e04a73efbc9f2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184694 (cherry picked from commit 53940f818f720d948b3d857dc9c66bdcbc999872) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184705 diff --git a/vcl/qt5/QtFilePicker.cxx b/vcl/qt5/QtFilePicker.cxx index 3193f9901db5..fc0f879d4b02 100644 --- a/vcl/qt5/QtFilePicker.cxx +++ b/vcl/qt5/QtFilePicker.cxx @@ -977,7 +977,7 @@ OUString QtFilePicker::getDirectory() uno::Sequence<OUString> seq = getSelectedFiles(); if (seq.getLength() > 1) seq.realloc(1); - return seq[0]; + return seq.hasElements() ? seq[0] : OUString(); } void QtFilePicker::setDescription(const OUString&) {}