diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 11:13:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-02 14:49:04 +0100 |
commit | 37f62f86aff64b94ca4a8cb34df6cfda216da3bf (patch) | |
tree | 92f4f2fcb81737f13a8583ec9c41843ff6a1ae2d /sd | |
parent | ef6a120af64b5d64e6194c3e538ab6f6f73d4bc8 (diff) |
coverity#1242496 Resource leak
Change-Id: I419b217df306d41ed99e603bae9381f54c633598
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 480a1d71cc31..e379ed0e9717 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1571,10 +1571,12 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, DBG_ASSERT(bTest, "Renaming StyleSheet failed."); pMySheet->GetItemSet().ClearItem(0); // Delete all - StyleSheetUndoAction* pUndoChStyle = new StyleSheetUndoAction(this, - pMySheet, &pHisSheet->GetItemSet()); if (bUndo) + { + StyleSheetUndoAction* pUndoChStyle = new StyleSheetUndoAction(this, + pMySheet, &pHisSheet->GetItemSet()); pUndoMgr->AddUndoAction(pUndoChStyle); + } pMySheet->GetItemSet().Put(pHisSheet->GetItemSet()); pMySheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED)); } |