From 4e42ce3271154904b7478b9ed5e6e6856b9235c2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 8 May 2013 12:29:53 +0200 Subject: Don't call code in UNO object ctor that throws UNO exceptions ...with Context set to this, that leads to refcounting bugs. Change-Id: I4875dbe4ccb5a7bcfaa8370b14d4eab83c21d0e5 --- cppuhelper/source/defaultbootstrap.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'cppuhelper/source/defaultbootstrap.cxx') diff --git a/cppuhelper/source/defaultbootstrap.cxx b/cppuhelper/source/defaultbootstrap.cxx index fc790bac1134..ff8338964132 100644 --- a/cppuhelper/source/defaultbootstrap.cxx +++ b/cppuhelper/source/defaultbootstrap.cxx @@ -56,11 +56,10 @@ cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) css::uno::Reference< css::uno::XInterface >()); } rtl::Reference< cppuhelper::ServiceManager > smgr( - new cppuhelper::ServiceManager( - getBootstrapVariable(bs, "UNO_SERVICES"))); - rtl::Reference< cppuhelper::TypeManager > tmgr( - new cppuhelper::TypeManager( - getBootstrapVariable(bs, "UNO_TYPES"))); + new cppuhelper::ServiceManager); + smgr->init(getBootstrapVariable(bs, "UNO_SERVICES")); + rtl::Reference< cppuhelper::TypeManager > tmgr(new cppuhelper::TypeManager); + tmgr->init(getBootstrapVariable(bs, "UNO_TYPES")); cppu::ContextEntry_Init entry; std::vector< cppu::ContextEntry_Init > context_values; context_values.push_back( -- cgit