diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-19 17:23:32 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-19 18:15:49 +0100 |
commit | d3b60aa648079e29f74e3e0fa1316e4eb3014ad9 (patch) | |
tree | 75fcf0e67da8c65f81677fb80ecb4633925cfadc /basic | |
parent | 09c722873b2d378d2d155f5f1dd7d8f3fb2012e9 (diff) |
CID#706118: possibly invalid cast
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 84dac3f2c794..496108da61b7 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1892,9 +1892,11 @@ sal_Bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer ) r >> nMod; 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 ) { + delete pBase; return sal_False; } else if( pMod->ISA(SbJScriptModule) ) |