linguistic/source/lngsvcmgr.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 9472871b192da98780d701e3bb29fce1bbc44c23 Author: Mike Kaganski <[email protected]> AuthorDate: Fri Jun 2 12:06:24 2023 +0300 Commit: Michael Stahl <[email protected]> CommitDate: Mon Jun 5 14:29:11 2023 +0200 Fix nullptr dereference Seen e.g. in builds where no grammar checker was available (like bibisect, or own builds), and LanguageTool is enabled in its page, and then enabled in Writing Aids options page (Available Language Modules list) in the same session, without program restart. Change-Id: I5ac007ec5e1dfc860085bfd3f95aa61a737ec449 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152529 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit a5c1c674e031087ef0516cebac049341dcdd2fcf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152531 Reviewed-by: Michael Stahl <[email protected]> diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index f38ee262099c..d1a12a396436 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -1493,6 +1493,8 @@ void SAL_CALL { if (!mxGrammarDsp.is()) GetGrammarCheckerDsp_Impl(); + if (!mxGrammarDsp) // e.g., when !SvtLinguConfig().HasGrammarChecker() + return; bool bChanged = !IsEqSvcList( rServiceImplNames, mxGrammarDsp->GetServiceList( rLocale ) ); if (bChanged)
