diff options
Diffstat (limited to 'connectivity/source/drivers/writer/WDriver.cxx')
-rw-r--r-- | connectivity/source/drivers/writer/WDriver.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/connectivity/source/drivers/writer/WDriver.cxx b/connectivity/source/drivers/writer/WDriver.cxx index fa3a3dcf685a..21325d73f6b6 100644 --- a/connectivity/source/drivers/writer/WDriver.cxx +++ b/connectivity/source/drivers/writer/WDriver.cxx @@ -38,17 +38,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* connectivity_writer_ODriver(css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const& /*rArguments*/) { - rtl::Reference<ODriver> ret; try { - ret = new ODriver(context); + return acquire(new ODriver(context)); } catch (...) { } - if (ret) - ret->acquire(); - return static_cast<cppu::OWeakObject*>(ret.get()); + return nullptr; } uno::Reference<sdbc::XConnection> |