summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-04 11:19:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-04 12:34:14 +0100
commit332a67afdc3d3c89c272aa3871e780cd30f34b36 (patch)
treef99a9bcff0e4688e338b491896b67efd8c0d5080 /connectivity
parent9e2ca10d8aba0d23f38fbfe40887f7372e5881b7 (diff)
coverity#736759 Dereference before null check
Change-Id: Ia36e192d32c46a5c1129eca050b2863ec1213bb4
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/file/fcode.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 9c18fb23579c..2f6ced4655b2 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -413,11 +413,12 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
OSL_ENSURE(!rCodeStack.empty(),"Stack must be none empty!");
pOperand = rCodeStack.top();
rCodeStack.pop();
- if ( !IS_TYPE(OStopOperand,pOperand) )
+ assert(pOperand);
+ if (pOperand && !IS_TYPE(OStopOperand,pOperand))
aValues.push_back( pOperand->getValue() );
aOperands.push_back( pOperand );
}
- while ( !IS_TYPE(OStopOperand,pOperand) );
+ while (pOperand && !IS_TYPE(OStopOperand,pOperand));
rCodeStack.push(new OOperandResult(operate(aValues)));