Kaydet (Commit) b7538690 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

coverity: fix memory leak

Change-Id: Ia69953147cc39b9f5683554188912b8f3fa22265
üst 3d12edc4
...@@ -70,7 +70,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet ) ...@@ -70,7 +70,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet )
{ {
if( SID_AVMEDIA_TOOLBOX == nWhich ) if( SID_AVMEDIA_TOOLBOX == nWhich )
{ {
SdrMarkList* pMarkList = new SdrMarkList( pView->GetMarkedObjectList() ); boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() ));
bool bDisable = true; bool bDisable = true;
if( 1 == pMarkList->GetMarkCount() ) if( 1 == pMarkList->GetMarkCount() )
...@@ -89,8 +89,6 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet ) ...@@ -89,8 +89,6 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet )
if( bDisable ) if( bDisable )
rSet.DisableItem( SID_AVMEDIA_TOOLBOX ); rSet.DisableItem( SID_AVMEDIA_TOOLBOX );
delete pMarkList;
} }
nWhich = aIter.NextWhich(); nWhich = aIter.NextWhich();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment