summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-02-24 12:37:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-02-24 17:14:23 +0100
commit61c2fb9a189254df4bc609ca248c922984c47565 (patch)
tree819757da4a61a6d3bb90b0e084fedf3e553ee874 /sw
parent3651482ef3a436bc1de01dcb333fa0cab7dc2d36 (diff)
crashtesting: iterators invalidated during loop with tdf94598-3.docx
Change-Id: I27fbf1ba578724bb15eadf14db19db62bbd5fc40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111484 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/tabfrm.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 6eb3ccfd1627..e6c8c2bc1a66 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -249,8 +249,10 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrame& _rLayoutFrame,
}
if ( pLowerFrame->GetDrawObjs() )
{
- for (SwAnchoredObject* pAnchoredObj : *pLowerFrame->GetDrawObjs())
+ for (size_t i = 0, nCount = pLowerFrame->GetDrawObjs()->size(); i < nCount; ++i)
{
+ SwAnchoredObject* pAnchoredObj = (*pLowerFrame->GetDrawObjs())[i];
+
// invalidate position of anchored object
pAnchoredObj->SetTmpConsiderWrapInfluence( false );
pAnchoredObj->SetConsiderForTextWrap( false );