diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-08-26 17:50:33 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2014-08-26 19:47:14 +0900 |
commit | 4d32244437475688ca951ce30f8d6fcc59fc1caa (patch) | |
tree | f4a613a49fc7d9a790714b6c38ae2fcae979d7b6 /sc/source/ui | |
parent | 37b9ea92ba81d74764a2345a9c75c65bfd272d2b (diff) |
Avoid possible memory leaks in case of exceptions
Change-Id: Ib4a87cab2729e18b2c830cbd7e7a34d62b5f0f45
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/miscdlgs/optsolver.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index e42917a4d469..36050651c662 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -543,14 +543,13 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn ) else if ( pBtn == m_pBtnOpt ) { //! move options dialog to UI lib? - ScSolverOptionsDialog* pOptDlg = - new ScSolverOptionsDialog( this, maImplNames, maDescriptions, maEngine, maProperties ); + boost::scoped_ptr<ScSolverOptionsDialog> pOptDlg( + new ScSolverOptionsDialog( this, maImplNames, maDescriptions, maEngine, maProperties )); if ( pOptDlg->Execute() == RET_OK ) { maEngine = pOptDlg->GetEngine(); maProperties = pOptDlg->GetProperties(); } - delete pOptDlg; } return 0; |