diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2000-10-18 12:20:58 +0000 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2000-10-18 12:20:58 +0000 |
commit | 57ddd157a009529673837547453f162047ca0906 (patch) | |
tree | fb152b6cf9facf439401ec31ee9edaded4802ee6 /cppuhelper/source/factory.cxx | |
parent | 0e481b7ac0b9015fedaa4d067aac30f88a4e87ad (diff) |
insert guard for assigning xModuleFactory a new factory
Diffstat (limited to 'cppuhelper/source/factory.cxx')
-rw-r--r-- | cppuhelper/source/factory.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 5271391d0beb..ae406398d5cd 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -2,9 +2,9 @@ * * $RCSfile: factory.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:26:10 $ + * last change: $Author: jsc $ $Date: 2000-10-18 13:20:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -435,7 +435,10 @@ Reference<XInterface > ORegistryFactoryHelper::createInstanceEveryTime() return OFactoryComponentHelper::createInstanceEveryTime(); if( !xModuleFactory.is() ) + { + MutexGuard aGuard( aMutex ); xModuleFactory = createModuleFactory(); + } if( xModuleFactory.is() ) return xModuleFactory->createInstance(); @@ -530,7 +533,10 @@ Reference<XInterface > SAL_CALL ORegistryFactoryHelper::createInstanceWithArgume throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { if( !xModuleFactory.is() ) + { + MutexGuard aGuard( aMutex ); xModuleFactory = createModuleFactory(); + } if( xModuleFactory.is() ) return xModuleFactory->createInstanceWithArguments( Arguments ); |