summaryrefslogtreecommitdiffstats
path: root/connectivity/source/manager/mdrivermanager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/manager/mdrivermanager.cxx')
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index bef3c8d74eaa..b30007667ec3 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -113,23 +113,23 @@ Any SAL_CALL ODriverEnumeration::nextElement( )
const DriverAccess& operator()( const DriverAccess& _rDescriptor ) const
{
// we did not load this driver, yet
- if (!_rDescriptor.xDriver.is())
+ if (_rDescriptor.xDriver.is())
+ return _rDescriptor;
+
+ // we have a factory for it
+ if (_rDescriptor.xComponentFactory.is())
{
- // we have a factory for it
- if (_rDescriptor.xComponentFactory.is())
+ DriverAccess& rDesc = const_cast<DriverAccess&>(_rDescriptor);
+ try
{
- DriverAccess& rDesc = const_cast<DriverAccess&>(_rDescriptor);
- try
- {
- //load driver
- rDesc.xDriver.set(
- rDesc.xComponentFactory->createInstanceWithContext(mxContext), css::uno::UNO_QUERY);
- }
- catch (const Exception&)
- {
- //failure, abandon driver
- rDesc.xComponentFactory.clear();
- }
+ //load driver
+ rDesc.xDriver.set(
+ rDesc.xComponentFactory->createInstanceWithContext(mxContext), css::uno::UNO_QUERY);
+ }
+ catch (const Exception&)
+ {
+ //failure, abandon driver
+ rDesc.xComponentFactory.clear();
}
}
return _rDescriptor;