summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-23 20:33:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-23 20:35:32 +0000
commit61360536d775aaf7f6006291b77f4fb9f86ed89d (patch)
tree3127b4769439bf95e4c1e79442db82cc62e421e2 /connectivity
parente4c7cfed889c4cbfdfc301bd2d501b6b542d3957 (diff)
coverity#440728 Explicit null dereferenced
Change-Id: I76b8d6eb59d2558a7ff8a1b1573f24e41a03b8b6
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/dbase/DIndex.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 55790e9fe15a..46237e707723 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -557,11 +557,9 @@ sal_Bool ODbaseIndex::CreateImpl()
if(xSet->last())
{
- Reference< XUnoTunnel> xTunnel(xSet,UNO_QUERY);
- ODbaseResultSet* pDbaseRes = NULL;
- if(xTunnel.is())
- pDbaseRes = reinterpret_cast< ODbaseResultSet* >( xTunnel->getSomething(ODbaseResultSet::getUnoTunnelImplementationId()) );
- OSL_ENSURE(pDbaseRes,"No dbase resultset found? What's going on here!");
+ Reference< XUnoTunnel> xTunnel(xSet, UNO_QUERY_THROW);
+ ODbaseResultSet* pDbaseRes = reinterpret_cast< ODbaseResultSet* >( xTunnel->getSomething(ODbaseResultSet::getUnoTunnelImplementationId()) );
+ assert(pDbaseRes); //"No dbase resultset found? What's going on here!
Reference<XRowLocate> xRowLocate(xSet,UNO_QUERY);
nRowsLeft = xSet->getRow();