summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index b2c6901dbe29..17392b1d5c5d 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -70,7 +70,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet )
{
if( SID_AVMEDIA_TOOLBOX == nWhich )
{
- SdrMarkList* pMarkList = new SdrMarkList( pView->GetMarkedObjectList() );
+ boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() ));
bool bDisable = true;
if( 1 == pMarkList->GetMarkCount() )
@@ -89,8 +89,6 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet )
if( bDisable )
rSet.DisableItem( SID_AVMEDIA_TOOLBOX );
-
- delete pMarkList;
}
nWhich = aIter.NextWhich();