summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-08 21:37:43 +0200
committerAndras Timar <andras.timar@collabora.com>2015-06-20 10:29:02 +0200
commit5a8dcadb56c55f7c2b4ceb5dd73360c8b149eb99 (patch)
treea3c4c142530e20d7818ec651204f027a8e628cc6 /linguistic
parent4e6e1fc9690c48654809f05ced643508d1819bac (diff)
linguistic: try to avoid crash with null LngSvcMgr::pAvailGrammarSvcs
Most likely it was cleared by another thread while this one showed the "no JRE" dialog. Change-Id: Ib0e74c73a510f52778163ad24c20d7ae835ced11 (cherry picked from commit 00a1f2089bb250a8a9130109baac4d0c93adc3d0)
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/lngsvcmgr.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 44c5551b7e03..9e56521fbacf 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -860,6 +860,8 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
SAL_WARN_IF( aKeyText.isEmpty(), "linguistic", "unexpected key (lang::Locale) string" );
if (rName.startsWith( aSpellCheckerList ))
{
+ osl::MutexGuard aGuard(GetLinguMutex());
+
// delete old cached data, needs to be acquired new on demand
clearSvcInfoArray(pAvailSpellSvcs);
@@ -885,6 +887,8 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
}
else if (rName.startsWith( aGrammarCheckerList ))
{
+ osl::MutexGuard aGuard(GetLinguMutex());
+
// delete old cached data, needs to be acquired new on demand
clearSvcInfoArray(pAvailGrammarSvcs);
@@ -913,6 +917,8 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
}
else if (rName.startsWith( aHyphenatorList ))
{
+ osl::MutexGuard aGuard(GetLinguMutex());
+
// delete old cached data, needs to be acquired new on demand
clearSvcInfoArray(pAvailHyphSvcs);
@@ -938,6 +944,8 @@ void LngSvcMgr::Notify( const uno::Sequence< OUString > &rPropertyNames )
}
else if (rName.startsWith( aThesaurusList ))
{
+ osl::MutexGuard aGuard(GetLinguMutex());
+
// delete old cached data, needs to be acquired new on demand
clearSvcInfoArray(pAvailThesSvcs);