diff options
Diffstat (limited to 'sw/source/core')
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index eb15585a3989..e0518927ab0c 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2767,11 +2767,17 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, void SwDoc::SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCellFrame* pBoxFrame ) { - SwTabFrame *pTab; - - OSL_ENSURE( pBoxFrame, "SetTabRows called without pBoxFrame" ); + SwTabFrame *pTab = nullptr; - pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + if( pBoxFrame ) + { + pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoxFrame))->ImplFindTabFrame(); + } + else + { + OSL_ENSURE( false, "must specify pBoxFrame" ); + return ; + } // If the Table is still using relative values (USHRT_MAX) // we need to switch to absolute ones. |