[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 1 11:24:18 UTC 2019


 sw/source/ui/fldui/changedb.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 0b6bb036168590795b674fb3fdfb42ba5fdac271
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 1 09:14:37 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 1 13:23:29 2019 +0200

    Resolves: tdf#127896 fix 'Exchange database' crash
    
    Change-Id: I8278c9e959ab054b5bccf0b33e5885cd4ac7573a
    Reviewed-on: https://gerrit.libreoffice.org/79923
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 0118adb136b0..5f076a0681c7 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -135,14 +135,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());


More information about the Libreoffice-commits mailing list