diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 11:12:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 14:49:03 +0100 |
commit | ef6a120af64b5d64e6194c3e538ab6f6f73d4bc8 (patch) | |
tree | ac9213dcb50a581a90d41f91c7e7c99fd52b3f19 /sd | |
parent | b99aad6cc20384c735a19c3530d0ad64ca664954 (diff) |
coverity#1242497 Resource leak
Change-Id: I2c4295c7d308257290aaf04181805d7dc71d6553
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index c5b6fa911a7b..480a1d71cc31 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1643,13 +1643,12 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, mxStyleSheetPool->SetSearchMask(SFX_STYLE_FAMILY_ALL); } - if( !aCreatedStyles.empty() ) + if (bUndo && !aCreatedStyles.empty()) { // Add UndoAction for creating and inserting the stylesheets to // the top of the UndoManager SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, aCreatedStyles, true); - if (bUndo) - pUndoMgr->AddUndoAction(pMovStyles); + pUndoMgr->AddUndoAction(pMovStyles); } } |