diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-06-19 13:08:34 +0200 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-06-19 15:39:37 +0200 |
commit | 101fdd94011d734d68ffd07fe9b92200c118dded (patch) | |
tree | cd1f092f8af9ad71dcd4fd436865eb115e293242 /unotools | |
parent | 0a9e57785e3a391cea1aa74b87afc6e2c2c0a398 (diff) |
fix regression, some mutexes need to live longer
commit 6149da20ddee5c0c50b445fb6a4e3e81b5ff900b
replace misc double checked locking patterns
... with thread safe local statics
reintroduced bug #i77768# despite big comment
Change-Id: Ic6e204a277c8aa4f43c5fd15a42066c6f8a69dad
Reviewed-on: https://gerrit.libreoffice.org/38959
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/syslocaleoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/misc/syslocale.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index ed1675ffaed1..c2123684396c 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -526,9 +526,9 @@ Mutex& SvtSysLocaleOptions::GetMutex() // #i77768# Due to a static reference in the toolkit lib // we need a mutex that lives longer than the svl library. // Otherwise the dtor would use a destructed mutex!! - static Mutex persistentMutex; + static Mutex* persistentMutex(new Mutex); - return persistentMutex; + return *persistentMutex; } bool SvtSysLocaleOptions::IsModified() diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx index 0dcecca29392..8dd7a5824982 100644 --- a/unotools/source/misc/syslocale.cxx +++ b/unotools/source/misc/syslocale.cxx @@ -137,9 +137,9 @@ Mutex& SvtSysLocale::GetMutex() // #i77768# Due to a static reference in the toolkit lib // we need a mutex that lives longer than the svl library. // Otherwise the dtor would use a destructed mutex!! - static Mutex persistentMutex; + static Mutex* persistentMutex(new Mutex); - return persistentMutex; + return *persistentMutex; } const LocaleDataWrapper& SvtSysLocale::GetLocaleData() const |