summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 e1d4833bd85e..7652462f0c74 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1344,21 +1344,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 )