summaryrefslogtreecommitdiff
path: root/sw/source/uibase/misc/redlndlg.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-06-09 12:26:02 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-06-09 16:41:10 +0900
commitcb28c59ff262cfc03dbd893dfe281ed41958b2c0 (patch)
tree084613310ce8d35f6fb7accb3833bec3407fe2b4 /sw/source/uibase/misc/redlndlg.cxx
parentc892c60ae7823a735879d42df3a44b582a3ed146 (diff)
Avoid possible memory leaks in case of exceptions
Change-Id: Id24acc128cf345a660e552f64c857906229f59c0
Diffstat (limited to 'sw/source/uibase/misc/redlndlg.cxx')
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 53aebdcdcc6d..8f5968d7bd84 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -54,6 +54,7 @@
#include <docsh.hxx>
#include <IDocumentRedlineAccess.hxx>
+#include <boost/scoped_ptr.hpp>
SFX_IMPL_MODELESSDIALOG_WITHID( SwRedlineAcceptChild, FN_REDLINE_ACCEPT )
@@ -1073,7 +1074,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
rRedline.GetRedlineData().GetTimeStamp() ),
SID_ATTR_POSTIT_DATE ));
- AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, false );
+ boost::scoped_ptr<AbstractSvxPostItDialog> pDlg(pFact->CreateSvxPostItDialog( pParentDlg, aSet, false ));
OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
@@ -1112,7 +1113,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
pTable->SetEntryText(sMsg.replace('\n', ' '), pEntry, 3);
}
- delete pDlg;
+ pDlg.reset();
pSh->SetCareWin(NULL);
}