diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-06-10 17:31:26 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2014-06-10 18:25:54 +0900 |
commit | ed9d32908dca5740109f0d9f3233721aa3a49775 (patch) | |
tree | 601a6f988c2e4824241d0b80bc7f18bbb21b9a74 /sw/source/uibase/shells/langhelper.cxx | |
parent | 2da7ce3ba8e5838b782fe4f9e26a29c1c7face54 (diff) |
Avoid possible memory leaks in case of exceptions
Change-Id: I0cb10efaa3ab08d2cf1338963917d89bdab15289
Diffstat (limited to 'sw/source/uibase/shells/langhelper.cxx')
-rw-r--r-- | sw/source/uibase/shells/langhelper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index d7fa3f583b50..62474b422739 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -52,6 +52,7 @@ #include <vcl/msgbox.hxx> #include <langhelper.hxx> +#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star; @@ -125,9 +126,8 @@ namespace SwLangHelper SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); if (pFact) { - VclAbstractDialog* pDlg = pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS ); + boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( rView.GetWindow(), SID_LANGUAGE_OPTIONS )); pDlg->Execute(); - delete pDlg; } } else |