vcl/jsdialog/executor.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 2225d8530b4a7fa29e551f9354d679da78be6435 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Mar 12 09:35:30 2021 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Fri Mar 12 11:37:01 2021 +0100 jsdialog: unselect treeview entry by iterator avoid crash when using relative position from deeper levels returned by get_selected_index to unselect entry using unselect function on root level Change-Id: Iaaddb131031eb5273cb06412c976f310f7323f52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112374 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index bca3d0a98ea7..aa71178a6605 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -242,7 +242,10 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat { OString nRowString = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); - pTreeView->unselect(pTreeView->get_selected_index()); + + std::unique_ptr<weld::TreeIter> itSelected(pTreeView->make_iterator()); + pTreeView->get_selected(itSelected.get()); + pTreeView->unselect(*itSelected); int nAbsPos = std::atoi(nRowString.getStr()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits