diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-05 13:41:29 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:09:56 +0100 |
commit | 6b001e1895a509edb1294a1fd098c209a5298d69 (patch) | |
tree | 9390366c9777aa27e1400e054288a2cb98901f50 /sw/source/uibase/utlui/content.cxx | |
parent | ec2e453d39b941a5cf3abcf729a889889976e09d (diff) |
sw: fix crash in SwContentTree::HasContentChanged()
Remove() will remove the node including its children, but
SvTreeList::Next() will actually return the first child, so the pChild
points to an entry that has been deleted.
Change-Id: Ia4bd75d64c8436ea03c0727a8d49ee0c34fda16f
Diffstat (limited to 'sw/source/uibase/utlui/content.cxx')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index ae98385adf70..86261677001a 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2202,14 +2202,11 @@ bool SwContentTree::HasContentChanged() } if(bRemoveChildren) { - SvTreeListEntry* pChild = FirstChild(pEntry); - SvTreeListEntry* pRemove = pChild; for(size_t j = 0; j < nChildCount; ++j) { - pChild = Next(pRemove); + SvTreeListEntry *const pRemove = FirstChild(pEntry); assert(pRemove); GetModel()->Remove(pRemove); - pRemove = pChild; } } if(!nChildCount) |