summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-23 09:16:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-23 10:55:46 +0100
commita93dec5936322122df3df6b969570b4c5b07d5e1 (patch)
tree5f48e2205981c17b7cc8d3de08bd996fe83600f7
parent62256ce4c2f2376f020186a456622091fb902236 (diff)
coverity#735795 Unchecked dynamic_cast
Change-Id: I3599c03d43761da73b89beae990f8688bd0b549b
-rw-r--r--sc/source/core/tool/interpr4.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 6b5247b0889b..8fd9d5142667 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3431,8 +3431,8 @@ void ScInterpreter::ScMacro()
else if ( eResType & SbxARRAY )
{
SbxBase* pElemObj = refRes->GetObject();
- SbxDimArray* pDimArray = dynamic_cast< SbxDimArray *>( pElemObj );
- short nDim = pDimArray->GetDims();
+ SbxDimArray* pDimArray = dynamic_cast<SbxDimArray*>(pElemObj);
+ short nDim = pDimArray ? pDimArray->GetDims() : 0;
if ( 1 <= nDim && nDim <= 2 )
{
sal_Int32 nCs, nCe, nRs, nRe;