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 10:35:04 +0100 |
commit | 4561119a8bab986df25a5ce2a544aa96394cbd5d (patch) | |
tree | e0c214589d3e353f3aebf222ee577775db36be20 | |
parent | e41a694c8b4fd1503b31f3a9da326e9f7ddd1b79 (diff) |
Resolves: tdf#100421, don't crash on deleting particular table
Change-Id: I52a4cf0732240aa26147313ae6a52c4fd8d8933c
-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; } |