summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/fulinend.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-05-21 00:21:12 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-05-21 00:25:20 +0900
commit1c9ba8a81ca3b92e8fd684b4c16a06b5180ceb64 (patch)
tree22646b8c6c344d11d1ebc131a4e3fc9f4a10bb47 /sd/source/ui/func/fulinend.cxx
parentdc24203e5f20dcbf2818651a8802e67338293b3c (diff)
Avoid possible memory leaks in case of exceptions
Change-Id: Idb8f0df3848416d96299ebc47ac5bd53d766e52c
Diffstat (limited to 'sd/source/ui/func/fulinend.cxx')
-rw-r--r--sd/source/ui/func/fulinend.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 304d82ff947c..8d9db840ab4a 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -32,6 +32,7 @@
#include "drawdoc.hxx"
#include "View.hxx"
#include "Window.hxx"
+#include <boost/scoped_ptr.hpp>
namespace sd {
@@ -114,7 +115,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- AbstractSvxNameDialog* pDlg = pFact ? pFact->CreateSvxNameDialog( NULL, aName, aDesc ) : 0;
+ boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( NULL, aName, aDesc ) : 0);
if( pDlg )
{
@@ -144,7 +145,6 @@ void FuLineEnd::DoExecute( SfxRequest& )
}
}
}
- delete pDlg;
}
}