summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-16 14:24:46 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-05 14:28:51 +0200
commit41734dab6098510709dd84fe62aa378021d5b97a (patch)
tree61d7930ea8902df0ef4ce37cf5e1e5fa1aaaa4ec
parentofz#9892 Null-dereference (diff)
downloadcore-41734dab6098510709dd84fe62aa378021d5b97a.tar.gz
core-41734dab6098510709dd84fe62aa378021d5b97a.zip
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 c5e9885b4d9b..c33afb6c30ff 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2029,13 +2029,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), "Keine ContentFrames gefunden." );
+ 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;