diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index ae406398d5cd..449bae49b4c3 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -2,9 +2,9 @@ * * $RCSfile: factory.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jsc $ $Date: 2000-10-18 13:20:58 $ + * last change: $Author: lla $ $Date: 2000-12-06 09:36:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -437,9 +437,11 @@ Reference ORegistryFactoryHelper::createInstanceEveryTime() if( !xModuleFactory.is() ) { MutexGuard aGuard( aMutex ); - xModuleFactory = createModuleFactory(); + if( !xModuleFactory.is() ) // is xModuleFactory really not set (MultiThreaded!) + { + xModuleFactory = createModuleFactory(); + } } - if( xModuleFactory.is() ) return xModuleFactory->createInstance(); @@ -535,7 +537,10 @@ Reference SAL_CALL ORegistryFactoryHelper::createInstanceWithArgume if( !xModuleFactory.is() ) { MutexGuard aGuard( aMutex ); - xModuleFactory = createModuleFactory(); + if( !xModuleFactory.is() ) // MultiThreaded! + { + xModuleFactory = createModuleFactory(); + } } if( xModuleFactory.is() )