linguistic/source/lngsvcmgr.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 5a8dcadb56c55f7c2b4ceb5dd73360c8b149eb99 Author: Michael Stahl <[email protected]> Date: Wed Apr 8 21:37:43 2015 +0200 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) diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 44c5551..9e56521 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); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
