coverity#1394268 Resource leak

Change-Id: I8f4a76d4f7e5cb2429ed5911c6026535590c681e
This commit is contained in:
Caolán McNamara 2016-11-08 09:06:23 +00:00
parent f606a6b248
commit 19fc36293c

View File

@ -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