summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-03-07 16:34:17 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-03-07 16:35:09 +0900
commite0e2f4c988af9dc73c7b3ce086efddc0a918406d (patch)
treee2a7d181b2c6606902fe1619263cd6be62948618 /vcl/source/app
parent50de43d6b40096747655c291ed4266e07680e679 (diff)
Avoid possible resource leaks with boost::scoped_ptr
Change-Id: I835bec5c43b7b4a8638d5032b720661fc2f1397f
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/dbggui.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 4ff4db9380a7..ac2cdd072f28 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -58,6 +58,7 @@
#include <map>
#include <algorithm>
+#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star;
@@ -1649,13 +1650,12 @@ void DbgGUIStart()
if ( pData )
{
- DbgDialog* pDialog = new DbgDialog;
+ boost::scoped_ptr<DbgDialog> pDialog(new DbgDialog);
// we switch off dialog tests for the debug dialog
sal_uLong nOldFlags = pData->nTestFlags;
pData->nTestFlags &= ~DBG_TEST_DIALOG;
if ( !pDialog->Execute() )
pData->nTestFlags |= (nOldFlags & DBG_TEST_DIALOG);
- delete pDialog;
}
else
{