tdf#55665: Fix a corner case OLE processing
This fixes two problems with WW8Export::TestOleNeedsGraphic: 1. not testing for NULL pGraphicsStream pointer, 2. not releasing that pointer in all cases. Change-Id: I67921aec3ce0cb131359e66ee3a6a136d76952a0 Reviewed-on: https://gerrit.libreoffice.org/15667 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
committed by
Caolán McNamara
parent
a1bfad005c
commit
a612c2ee5f
@@ -179,14 +179,13 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
|
|||||||
delete pGraphicStream;
|
delete pGraphicStream;
|
||||||
pGraphicStream =
|
pGraphicStream =
|
||||||
::utl::UcbStreamHelper::CreateStream( aCnt.GetGraphicStream( pRet->GetObjRef() ) );
|
::utl::UcbStreamHelper::CreateStream( aCnt.GetGraphicStream( pRet->GetObjRef() ) );
|
||||||
if( rGF.ImportGraphic( aGr2, OUString(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW ) == GRFILTER_OK )
|
if( pGraphicStream && rGF.ImportGraphic( aGr2, OUString(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW ) == GRFILTER_OK )
|
||||||
{
|
{
|
||||||
if ( aGr1 == aGr2 )
|
if ( aGr1 == aGr2 )
|
||||||
bGraphicNeeded = false;
|
bGraphicNeeded = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
delete pGraphicStream;
|
delete pGraphicStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user