Kaydet (Commit) 6e29f568 authored tarafından Julien Nabet's avatar Julien Nabet

coverity#705732: Resource leak

Change-Id: I926c3cbe25b7b4310d67a8f9e96b4a98e61b26e0
üst 7b4cd4b1
......@@ -1136,16 +1136,13 @@ void SdrUndoObjSetText::Undo()
void SdrUndoObjSetText::Redo()
{
// copy text for Undo, because the original now belongs to SetOutlinerParaObject()
OutlinerParaObject* pText1 = pNewText;
if(pText1)
pText1 = new OutlinerParaObject(*pText1);
SdrText* pText = static_cast< SdrTextObj*>( pObj )->getText(mnText);
if( pText )
if( pText && pNewText)
{
// copy text for Undo, because the original now belongs to SetOutlinerParaObject()
OutlinerParaObject* pText1 = new OutlinerParaObject(*pNewText);
static_cast< SdrTextObj* >( pObj )->NbcSetOutlinerParaObjectForText( pText1, pText );
}
pObj->ActionChanged();
// Trigger PageChangeCall
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment