diff options
Diffstat (limited to 'cppuhelper/source/component.cxx')
-rw-r--r-- | cppuhelper/source/component.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx index 1c3585ee17d4..c9bd6a4a9b28 100644 --- a/cppuhelper/source/component.cxx +++ b/cppuhelper/source/component.cxx @@ -112,21 +112,13 @@ void OComponentHelper::release() throw() Sequence< Type > OComponentHelper::getTypes() { - static OTypeCollection * s_pTypes = nullptr; - if (! s_pTypes) - { - MutexGuard aGuard( Mutex::getGlobalMutex() ); - if (! s_pTypes) - { - static OTypeCollection s_aTypes( - cppu::UnoType<lang::XComponent>::get(), - cppu::UnoType<lang::XTypeProvider>::get(), - cppu::UnoType<XAggregation>::get(), - cppu::UnoType<XWeak>::get() ); - s_pTypes = &s_aTypes; - } - } - return s_pTypes->getTypes(); + static OTypeCollection s_aTypes( + cppu::UnoType<lang::XComponent>::get(), + cppu::UnoType<lang::XTypeProvider>::get(), + cppu::UnoType<XAggregation>::get(), + cppu::UnoType<XWeak>::get() ); + + return s_aTypes.getTypes(); } // XComponent |