diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 14:24:46 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-08-20 11:58:19 +0200 |
commit | 81818670fe90fca438dfb0c22903474745112cfe (patch) | |
tree | 85931c4f05727a5dc1827547c0757f6bbd5dddc1 /sw/source | |
parent | a19a65193a564a0eccdb63b7e2ca272d32aa9180 (diff) |
tdf#119224 start and end are expected to exist for the scope of this function
Change-Id: I771bce68a2ac923af6a7d54646a2c59ce6f10f7e
Reviewed-on: https://gerrit.libreoffice.org/59179
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 22273e0173e6..14887a9e274f 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2040,13 +2040,15 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) //First obtain the ContentFrames for the start and the end - those are needed //anyway. - SwContentFrame const* pStartFrame = pStartPos->nNode.GetNode(). + SwContentFrame* pStartFrame = pStartPos->nNode.GetNode(). GetContentNode()->getLayoutFrame( this, &rCursor.GetSttPos(), pStartPos ); - SwContentFrame const* pEndFrame = pEndPos->nNode.GetNode(). + SwContentFrame* pEndFrame = pEndPos->nNode.GetNode(). GetContentNode()->getLayoutFrame( this, &rCursor.GetEndPos(), pEndPos ); - OSL_ENSURE( (pStartFrame && pEndFrame), "No ContentFrames found." ); + assert(pStartFrame && pEndFrame && "No ContentFrames found."); + //tdf#119224 start and end are expected to exist for the scope of this function + SwFrameDeleteGuard aStartFrameGuard(pStartFrame), aEndFrameGuard(pEndFrame); //Do not subtract the FlyFrames in which selected Frames lie. SwSortedObjs aSortObjs; |