diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-04 11:19:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-04 12:34:14 +0100 |
commit | 332a67afdc3d3c89c272aa3871e780cd30f34b36 (patch) | |
tree | f99a9bcff0e4688e338b491896b67efd8c0d5080 /connectivity/source/drivers/file/fcode.cxx | |
parent | coverity#705863 Dereference before null check (diff) | |
download | core-332a67afdc3d3c89c272aa3871e780cd30f34b36.tar.gz core-332a67afdc3d3c89c272aa3871e780cd30f34b36.zip |
coverity#736759 Dereference before null check
Change-Id: Ia36e192d32c46a5c1129eca050b2863ec1213bb4
Diffstat (limited to 'connectivity/source/drivers/file/fcode.cxx')
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 5 |
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))); |