sw/source/ui/fldui/changedb.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
New commits: commit 000849f1cccba60c129c0c4cd8b66a29dcec2269 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Oct 1 09:14:37 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Oct 1 16:51:18 2019 +0200 Resolves: tdf#127896 fix 'Exchange database' crash Change-Id: I8278c9e959ab054b5bccf0b33e5885cd4ac7573a Reviewed-on: https://gerrit.libreoffice.org/79924 Reviewed-by: Michael Stahl <michael.st...@cib.de> Tested-by: Jenkins diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index b04d69a6baef..22715e42c464 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -142,14 +142,17 @@ std::unique_ptr<weld::TreeIter> SwChangeDBDlg::Insert(const OUString& rDBName) { if (sDBName == m_xUsedDBTLB->get_text(*xIter)) { - if (m_xUsedDBTLB->iter_children(*xIter)) + if (m_xUsedDBTLB->iter_has_child(*xIter)) { - do + std::unique_ptr<weld::TreeIter> xChild(m_xUsedDBTLB->make_iterator(xIter.get())); + if (m_xUsedDBTLB->iter_children(*xChild)) { - if (sTableName == m_xUsedDBTLB->get_text(*xIter)) - return xIter; - } while (m_xUsedDBTLB->iter_next_sibling(*xIter)); - m_xUsedDBTLB->iter_parent(*xIter); + do + { + if (sTableName == m_xUsedDBTLB->get_text(*xChild)) + return xChild; + } while (m_xUsedDBTLB->iter_next_sibling(*xChild)); + } } m_xUsedDBTLB->insert(xIter.get(), -1, &sTableName, &sUserData, nullptr, nullptr, &rToInsert, false, xIter.get()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits