summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-05-19 22:25:31 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-05-19 22:28:31 +0900
commit018e2f629e125f1a0fe33471a0e4fe606813aa91 (patch)
tree68e8420ba62a0cb41b32edc766943d9c9249715d /sd/source/filter
parentb1aa528721c578767985a1b31f653375f26db076 (diff)
Avoid possible memory leaks in case of exceptions
Change-Id: I61fe5f5fff157531de9962a2dd4e6e0431e8601c
Diffstat (limited to 'sd/source/filter')
-rw-r--r--sd/source/filter/html/HtmlOptionsDialog.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/filter/html/HtmlOptionsDialog.cxx b/sd/source/filter/html/HtmlOptionsDialog.cxx
index d9ecbafd2eea..feb9ca4bbdcb 100644
--- a/sd/source/filter/html/HtmlOptionsDialog.cxx
+++ b/sd/source/filter/html/HtmlOptionsDialog.cxx
@@ -46,6 +46,8 @@ using namespace com::sun::star::ui::dialogs;
#include "pres.hxx"
#include "sdabstdlg.hxx"
+#include <boost/scoped_ptr.hpp>
+
class SdHtmlOptionsDialog : public cppu::WeakImplHelper5
<
XExporter,
@@ -221,7 +223,7 @@ sal_Int16 SdHtmlOptionsDialog::execute()
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact )
{
- AbstractSdPublishingDlg* pDlg = pFact->CreateSdPublishingDlg( Application::GetDefDialogParent(), meDocType );
+ boost::scoped_ptr<AbstractSdPublishingDlg> pDlg(pFact->CreateSdPublishingDlg( Application::GetDefDialogParent(), meDocType ));
if( pDlg )
{
if( pDlg->Execute() )
@@ -233,7 +235,6 @@ sal_Int16 SdHtmlOptionsDialog::execute()
{
nRet = ExecutableDialogResults::CANCEL;
}
- delete pDlg;
}
}
return nRet;