summaryrefslogtreecommitdiffstats
path: root/connectivity/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-22 16:21:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-22 21:56:13 +0200
commitc816cb847da9a3302f23e113171c81fed6b319c0 (patch)
tree59c68cf6d5008e65dbdd379cbbe6fca5a887ee8b /connectivity/source
parentintermediate _disposing call doesn't exist anymore (diff)
downloadcore-c816cb847da9a3302f23e113171c81fed6b319c0.tar.gz
core-c816cb847da9a3302f23e113171c81fed6b319c0.zip
pvs-studio: V571 Recurring check
Change-Id: I1ad7bcfa557b38488adf26b434433e6bae259f43 Reviewed-on: https://gerrit.libreoffice.org/62190 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity/source')
-rw-r--r--connectivity/source/commontools/dbtools.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index b8b8a4cdd29b..26e2c604a230 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -591,16 +591,13 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect
eState = FAILED;
OSL_ENSURE( xObjectCollection.is(), "::dbtools::getFieldsByCommandDescriptor: invalid connection (no sdb.Connection, or no Tables-/QueriesSupplier)!");
- if ( xObjectCollection.is() )
+ if ( xObjectCollection.is() && xObjectCollection->hasByName( _rCommand ) )
{
- if ( xObjectCollection.is() && xObjectCollection->hasByName( _rCommand ) )
- {
- xObjectCollection->getByName( _rCommand ) >>= xSupplyColumns;
- // (xSupplyColumns being NULL will be handled in the next state)
+ xObjectCollection->getByName( _rCommand ) >>= xSupplyColumns;
+ // (xSupplyColumns being NULL will be handled in the next state)
- // next: go for the columns
- eState = RETRIEVE_COLUMNS;
- }
+ // next: go for the columns
+ eState = RETRIEVE_COLUMNS;
}
break;