diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-05-18 23:09:36 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2014-05-18 23:11:14 +0900 |
commit | c623612b0bd0bbd2307a19ccf3c2f1f343b932b3 (patch) | |
tree | d6acdc5fbb73c0bbee22ed3f995d8fb17dba9d33 /sc/source/ui/view/tabvwsh3.cxx | |
parent | 558618e0dd75424bd2d7134ba536ee78bdb4a26a (diff) |
Avoid possible memory leaks in case of exceptions
Change-Id: Icc1e11e173329fd88898a3d13270406fd651eb2b
Diffstat (limited to 'sc/source/ui/view/tabvwsh3.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh3.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 7c2a2c2aa383..58665e25b376 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -790,7 +790,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScShowTabDlg* pDlg = pFact->CreateScShowTabDlg(GetDialogParent()); + boost::scoped_ptr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetDialogParent())); OSL_ENSURE(pDlg, "Dialog create fail!"); pDlg->SetDescription( OUString( ScResId( STR_DLG_SELECTTABLES_TITLE ) ), @@ -811,7 +811,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) sal_uInt16 nSelIx; for( nSelIx = 0; nSelIx < nSelCount; ++nSelIx ) aIndexList.insert( aIndexList.begin()+nSelIx, pDlg->GetSelectEntryPos( nSelIx ) ); - delete pDlg; + pDlg.reset(); rReq.AppendItem( SfxIntegerListItem( SID_SELECT_TABLES, aIndexList ) ); } else |