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 )
{
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();
......
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