summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-16 14:24:46 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-11-29 07:51:45 +0100
commit457411a2f916787d9dfc32268bc506b1133b0908 (patch)
treea872cc34f8f9b02632824feef1b136ee53dee4cf
parent28e29aa7a7d600933aef99d578c4363b8fd16fcc (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> (cherry picked from commit 81818670fe90fca438dfb0c22903474745112cfe)
-rw-r--r--sw/source/core/layout/trvlfrm.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index d854e092705c..8203953bd7f1 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2004,13 +2004,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;