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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user