summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-06-19 13:08:34 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2017-06-19 15:39:37 +0200
commit101fdd94011d734d68ffd07fe9b92200c118dded (patch)
treecd1f092f8af9ad71dcd4fd436865eb115e293242
parent0a9e57785e3a391cea1aa74b87afc6e2c2c0a398 (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>
-rw-r--r--svl/source/numbers/zforlist.cxx4
-rw-r--r--unotools/source/config/syslocaleoptions.cxx4
-rw-r--r--unotools/source/misc/syslocale.cxx4
3 files changed, 6 insertions, 6 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 1b77382bc6bd..3d582a33da0f 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -353,9 +353,9 @@ void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
// #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 ::osl::Mutex persistantMutex;
+ static osl::Mutex* persistentMutex(new osl::Mutex);
- return persistantMutex;
+ return *persistentMutex;
}
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