diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-17 10:10:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-17 16:44:29 +0100 |
commit | ff7028465c5c5cd30a9bb28ac6aa610e67c4e843 (patch) | |
tree | dbb42dbb79caca14c5d06871de5241f4a271e0bb | |
parent | f054ba24056dba34576bc43a86abb0b828917585 (diff) |
Resolves: tdf#100421, don't crash on deleting particular table
Change-Id: I52a4cf0732240aa26147313ae6a52c4fd8d8933c
(cherry picked from commit 4561119a8bab986df25a5ce2a544aa96394cbd5d)
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 002b653c5432..422d64e9fce4 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4326,8 +4326,10 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) //Only shrink as much as the content of the biggest cell allows. SwTwips nRealDist = nDist; + SwFormat* pMod = GetFormat(); + if (pMod) { - const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize(); + const SwFormatFrameSize &rSz = pMod->GetFrameSize(); SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0; @@ -4361,7 +4363,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) Frame().Pos().X() += nReal; } - SwTwips nTmp = GetUpper()->Shrink( nReal, bTst ); + SwLayoutFrame* pFrame = GetUpper(); + SwTwips nTmp = pFrame ? pFrame->Shrink(nReal, bTst) : 0; if ( !bShrinkAnyway && !GetNext() && nTmp != nReal ) { //The last one gets the leftover in the upper and therefore takes diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 163546350237..9451c0ae54e4 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -1216,7 +1216,7 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo ) const SwTabFrame* pTab = FindTabFrame(); // NEW TABLES - if ( pTab->IsVertical() != IsVertical() || + if ( (pTab && pTab->IsVertical() != IsVertical()) || pThisCell->GetLayoutRowSpan() < 1 ) return 0; } |