diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 6acddfde05ff..38a29c2091d8 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -238,7 +238,7 @@ namespace sdr { OutlinerParaObject* pParaObj = mxCell->GetEditOutlinerParaObject(); - bool bOwnParaObj = pParaObj != nullptr; + const bool bOwnParaObj = pParaObj != nullptr; if( pParaObj == nullptr ) pParaObj = mxCell->GetOutlinerParaObject(); @@ -319,13 +319,19 @@ namespace sdr // Set a cell vertical property OutlinerParaObject* pParaObj = mxCell->GetEditOutlinerParaObject(); + + const bool bOwnParaObj = pParaObj != nullptr; + if( pParaObj == nullptr ) pParaObj = mxCell->GetOutlinerParaObject(); + if(pParaObj) { pParaObj->SetVertical(bVertical); - } + if( bOwnParaObj ) + delete pParaObj; + } } // call parent