summaryrefslogtreecommitdiff
path: root/unotools/source/config/optionsdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unotools/source/config/optionsdlg.cxx')
-rw-r--r--unotools/source/config/optionsdlg.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx
index c8a12c088804..4aeb603a6717 100644
--- a/unotools/source/config/optionsdlg.cxx
+++ b/unotools/source/config/optionsdlg.cxx
@@ -92,20 +92,14 @@ public:
const OUString& _rGroup ) const;
};
-::osl::Mutex & SvtOptionsDlgOptions_Impl::getInitMutex()
+namespace
{
- static ::osl::Mutex *pMutex = 0;
+ class theOptionsDlgOptions_ImplMutex : public rtl::Static<osl::Mutex, theOptionsDlgOptions_ImplMutex>{};
+}
- if( ! pMutex )
- {
- ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
- if( ! pMutex )
- {
- static ::osl::Mutex mutex;
- pMutex = &mutex;
- }
- }
- return *pMutex;
+::osl::Mutex & SvtOptionsDlgOptions_Impl::getInitMutex()
+{
+ return theOptionsDlgOptions_ImplMutex::get();
}
// -----------------------------------------------------------------------