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

CID#706118: possibly invalid cast

üst 09c72287
...@@ -1892,9 +1892,11 @@ sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer ) ...@@ -1892,9 +1892,11 @@ sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
r >> nMod; r >> nMod;
for( sal_uInt16 i = 0; i < nMod; i++ ) for( sal_uInt16 i = 0; i < nMod; i++ )
{ {
SbModule* pMod = (SbModule*) SbxBase::Load( r ); SbxBase* pBase = SbxBase::Load( r );
SbModule* pMod = dynamic_cast<SbModule*>(pBase);
if( !pMod ) if( !pMod )
{ {
delete pBase;
return sal_False; return sal_False;
} }
else if( pMod->ISA(SbJScriptModule) ) else if( pMod->ISA(SbJScriptModule) )
......
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