From 5840a28fd43146e1d76beacdedacd48107e5f8c6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 23 Sep 2016 09:04:25 +0100 Subject: coverity#1373351 make SetTabRows the same as SetTabCols Change-Id: I9cfe2f3ec96ee72ff2e7657661a003086d301db6 --- sw/source/core/docnode/ndtbl.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sw/source/core') 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(static_cast(pBoxFrame))->ImplFindTabFrame(); + if( pBoxFrame ) + { + pTab = const_cast(static_cast(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. -- cgit v1.2.3