summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-08-07 10:33:08 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-09-19 10:18:19 +0200
commit7f406cbacf9c3abc45c7241535472ffab807e2f0 (patch)
tree88ae021cc203822fac10caae22dc8b543b8122aa /sw
parentdeacee23d9530350988eef68b0e9bb5cfcf2fde3 (diff)
sw: avoid asserts from SwSortedObjs::Insert()
The first frame is almost certainly already inserted in line 2057; This causes "<SwSortedObjs::Insert()> - already contains object". Change-Id: I4a785accdec033865da971bf25d0ebe06ec2e765
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/trvlfrm.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index b31483b18f8f..8f523cf32390 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2494,7 +2494,10 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
if ( pContent->IsInFly() )
{
const SwAnchoredObject* pObj = pContent->FindFlyFrame();
- aSortObjs.Insert( *const_cast<SwAnchoredObject*>(pObj) );
+ if (!aSortObjs.Contains(*pObj))
+ { // is this even possible, assuming valid cursor pos.?
+ aSortObjs.Insert( *const_cast<SwAnchoredObject*>(pObj) );
+ }
}
// Consider only frames which have the same IsInDocBody value like pStartFrame