summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2020-03-17 21:18:41 +0300
committerMichael Stahl <michael.stahl@cib.de>2020-03-23 14:13:38 +0100
commite73871e273c815461626782b2b055c946c6042d2 (patch)
tree47cb80f652ca32f509c8da154fa7501749213c2e /sw
parent2de34614f65c0db153a0e8390c17a9fd0748c7d3 (diff)
tdf#130746: avoid nullptr dereference
Change-Id: I32979a23caffea844f1c8eac9f408b18f0768b62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90661 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 81588ff2f0eb55576a5288778be2dfb5b4bc5e81) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90632 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/frmtool.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 0cad5caca44a..eafc4fd48a49 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -3451,9 +3451,9 @@ bool IsFrameInSameContext( const SwFrame *pInnerFrame, const SwFrame *pFrame )
static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell )
{
- if ( pCell->Lower()->IsContentFrame() || pCell->Lower()->IsSctFrame() )
+ SwFrame *pLow = pCell->Lower();
+ if ( pLow && (pLow->IsContentFrame() || pLow->IsSctFrame()) )
{
- SwFrame *pLow = pCell->Lower();
long nHeight = 0, nFlyAdd = 0;
do
{
@@ -3480,7 +3480,6 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell )
else
{
long nRstHeight = 0;
- SwFrame *pLow = pCell->Lower();
while (pLow && pLow->IsLayoutFrame())
{
nRstHeight += ::CalcRowRstHeight(static_cast<SwLayoutFrame*>(pLow));