diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-08 21:37:43 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-10 23:35:39 +0200 |
commit | 00a1f2089bb250a8a9130109baac4d0c93adc3d0 (patch) | |
tree | 6951d0fdcb2ac1dac9b0464bdeebc6fc3d03ce9a /linguistic | |
parent | 68786ad8fd26a7785d568133b5328281c4b4496f (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
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 58bfa7750754..c840b87111e2 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); |