diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 10:13:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 16:29:13 +0100 |
commit | a7fcb3ed07f535ebbd4e74b423fb6ccbb47e78cb (patch) | |
tree | 0356a8e9b08d2edbd57561a2bde4f2c446c44112 /basic | |
parent | 2daceb87b9e14868833fa746ec6efe93fc2dfadb (diff) |
clang: Returning null reference
Change-Id: I2cfc14e73696a027283dfa5eef98f784505dc5a3
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index a9949377f2d7..ec82700b5afa 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2597,10 +2597,12 @@ SbxInfo* SbUnoMethod::GetInfo() const Sequence<ParamInfo>& SbUnoMethod::getParamInfos( void ) { - if( !pParamInfoSeq && m_xUnoMethod.is() ) + if (!pParamInfoSeq) { - Sequence<ParamInfo> aTmp = m_xUnoMethod->getParameterInfos() ; - pParamInfoSeq = new Sequence<ParamInfo>( aTmp ); + Sequence<ParamInfo> aTmp; + if (m_xUnoMethod.is()) + aTmp = m_xUnoMethod->getParameterInfos(); + pParamInfoSeq = new Sequence<ParamInfo>(aTmp); } return *pParamInfoSeq; } |