diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-03 10:18:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-03 16:30:32 +0100 |
commit | 0f6c6baf61324db4d872411773fbf4ad18653f7f (patch) | |
tree | e3cf87b86f6c109d405bcbe9aeebdc256a415e04 /basic | |
parent | 2e048774847c649c946b7bd809cb873ef2416dcb (diff) |
coverity#1242481 Dereference null return value
Change-Id: I21e6bdd643d898a3515a96e4c9c17c2d6f98b0e4
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index bfcde23b3abf..19eb91ef4836 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -543,8 +543,8 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj ) SbxDimArray* pSource = PTR_CAST(SbxDimArray,pParObj); SbxDimArray* pDest = new SbxDimArray( pVar->GetType() ); - pDest->setHasFixedSize( pSource->hasFixedSize() ); - if ( pSource->GetDims() && pSource->hasFixedSize() ) + pDest->setHasFixedSize( pSource ? pSource->hasFixedSize() : false ); + if ( pSource && pSource->GetDims() && pSource->hasFixedSize() ) { sal_Int32 lb = 0; sal_Int32 ub = 0; |