[Libreoffice-commits] core.git: Branch 'libreoffice-6-3-4' - sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 4 18:14:59 UTC 2019


 sw/source/uibase/utlui/content.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit b9a30317cb56adb885efcbc5dc400dfdb873ab6d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Nov 22 10:10:27 2019 +0000
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Wed Dec 4 19:14:14 2019 +0100

    Resolves: rhbz#1775544 crash in navigator
    
    see demo reproducer in rhbz#1775544 nChildCount is a count of all
    descendants not just direct children.
    
    Just looping while FirstChild returns something is sufficient.
    
    Change-Id: If7b16032731d694bfffaae22faad5fe194d1822f
    Reviewed-on: https://gerrit.libreoffice.org/83459
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 7590e77180ad..880e1df23ce8 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2218,12 +2218,8 @@ bool SwContentTree::HasContentChanged()
                     }
                     if(bRemoveChildren)
                     {
-                        for(size_t j = 0; j < nChildCount; ++j)
-                        {
-                            SvTreeListEntry *const pRemove = FirstChild(pEntry);
-                            assert(pRemove);
-                            GetModel()->Remove(pRemove);
-                        }
+                        while (SvTreeListEntry *const pRemove = FirstChild(pEntry))
+                            RemoveEntry(pRemove);
                     }
                     if(!nChildCount)
                     {


More information about the Libreoffice-commits mailing list