diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-03-13 21:06:52 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-03-13 21:08:48 +0100 |
commit | 6e29f56895cd38aa7dee85112370a7cfc0d24632 (patch) | |
tree | cd974745ce30ba282d6da9b0770b7b54c50599c3 /svx | |
parent | 7b4cd4b1106afbca62b011501fa040690b861cef (diff) |
coverity#705732: Resource leak
Change-Id: I926c3cbe25b7b4310d67a8f9e96b4a98e61b26e0
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdundo.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index c1e4b4dd1ff9..7f310ee349c5 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -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 |