summaryrefslogtreecommitdiff
path: root/sw/source/ui/fldui
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-06-04 04:11:15 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-06-04 04:17:18 +0900
commit7883992dd5f8561b6eb192fce864b76c3034b1c5 (patch)
tree7025fcae30913753f8ec86e502bec5d33bb436f3 /sw/source/ui/fldui
parentb1a5aedb74d623709c4448b75c250e9fe17b9c28 (diff)
Avoid possible memory leaks in case of exceptions
Change-Id: I45929aae52fa106b5f5c0199f8ce8b60c0ac5438
Diffstat (limited to 'sw/source/ui/fldui')
-rw-r--r--sw/source/ui/fldui/fldedt.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 45bf150b9f0f..54b938b48f7c 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -46,6 +46,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <boost/scoped_ptr.hpp>
namespace swui
{
@@ -312,15 +313,14 @@ IMPL_LINK_NOARG(SwFldEditDlg, AddressHdl)
SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( this, aSet,
+ boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( this, aSet,
pSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface(),
- RC_DLG_ADDR );
+ RC_DLG_ADDR ));
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
pSh->UpdateFlds( *pCurFld );
}
- delete pDlg;
return 0;
}