diff options
Diffstat (limited to 'unotools/source/config/defaultoptions.cxx')
-rw-r--r-- | unotools/source/config/defaultoptions.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index 82c66b8112bc..0bcba50716bd 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -104,7 +104,11 @@ private: // global ---------------------------------------------------------------- -std::weak_ptr<SvtDefaultOptions_Impl> pOptions; +namespace { + +std::weak_ptr<SvtDefaultOptions_Impl> g_pOptions; + +} typedef OUString SvtDefaultOptions_Impl:: *PathStrPtr; @@ -326,11 +330,11 @@ SvtDefaultOptions::SvtDefaultOptions() { // Global access, must be guarded (multithreading) ::osl::MutexGuard aGuard( lclMutex::get() ); - pImpl = pOptions.lock(); + pImpl = g_pOptions.lock(); if ( !pImpl ) { pImpl = std::make_shared<SvtDefaultOptions_Impl>(); - pOptions = pImpl; + g_pOptions = pImpl; ItemHolder1::holdConfigItem(E_DEFAULTOPTIONS); } } |