summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-13 10:33:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-13 10:33:59 +0000
commit21796a5fb92fd9773017b782a654a8b5a190cc66 (patch)
tree00663501919a32bf720085f67012ff6b5d7927e1 /sw
parent9df101c7e9ff36a1425f96ec78aaf11f23577842 (diff)
Resolves: tdf#79569 crash undoing tricky cell merge
Change-Id: I68d774d0d3758cdb67864d7939a7e1167dd9a7df
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/undo/untbl.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 9f1e754227c0..9778de2e6213 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1351,21 +1351,22 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl
{
// search box for StartNode in old table
SwTableBox* pBox = rTbl.GetTblBox( nSttNode );
- OSL_ENSURE( pBox, "Where is my TableBox?" );
-
- SwFrmFmt* pOld = pBox->GetFrmFmt();
- pBox->RegisterToFormat( *pFmt );
- if( !pOld->GetDepends() )
- delete pOld;
+ if (pBox)
+ {
+ SwFrmFmt* pOld = pBox->GetFrmFmt();
+ pBox->RegisterToFormat( *pFmt );
+ if( !pOld->GetDepends() )
+ delete pOld;
- pBox->setRowSpan( nRowSpan );
+ pBox->setRowSpan( nRowSpan );
- SwTableBoxes* pTBoxes = &pBox->GetUpper()->GetTabBoxes();
- pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pBox ) );
+ SwTableBoxes* pTBoxes = &pBox->GetUpper()->GetTabBoxes();
+ pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pBox ) );
- pBox->SetUpper( &rParent );
- pTBoxes = &rParent.GetTabBoxes();
- pTBoxes->push_back( pBox );
+ pBox->SetUpper( &rParent );
+ pTBoxes = &rParent.GetTabBoxes();
+ pTBoxes->push_back( pBox );
+ }
}
if( pNext )