summaryrefslogtreecommitdiff
path: root/package/source/xstor/xfactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/xstor/xfactory.cxx')
-rw-r--r--package/source/xstor/xfactory.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx
index f398e5f2b909..89e94dc4e3d3 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -32,6 +32,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/weak.hxx>
#include <osl/diagnose.h>
#include "xfactory.hxx"
@@ -287,9 +288,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
package_OStorageFactory_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- static rtl::Reference<OStorageFactory> g_Instance(new OStorageFactory(context));
- g_Instance->acquire();
- return static_cast<cppu::OWeakObject*>(g_Instance.get());
+ return cppu::acquire(static_cast<cppu::OWeakObject*>(new OStorageFactory(context)));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */