diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-13 20:38:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-15 10:21:21 +0100 |
commit | 9831dc20ab35bfe962f35d9033a3812be745a958 (patch) | |
tree | c6c3a73a07b2f3adabbe91d893aae2081f788ddf /basic | |
parent | 6d1ee0f6fb40cbdac48abde99d4d41b50c4f0fcf (diff) |
coverity#441607 Dereference null return value
Change-Id: Ibec5bb74a708786e71f9e9a53be71e9cc50c5b69
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/codegen.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 70fdc55af345..d71c8432b4fa 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -334,9 +334,13 @@ void SbiCodeGen::Save() { nUserData |= PARAM_INFO_WITHBRACKETS; } + SbxParamInfo* pParam = NULL; if( nUserData ) { - SbxParamInfo* pParam = (SbxParamInfo*)pInfo->GetParam( i ); + pParam = (SbxParamInfo*)pInfo->GetParam( i ); + } + if( pParam ) + { pParam->nUserData = nUserData; } } |