linguistic/source/lngsvcmgr.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit a5c1c674e031087ef0516cebac049341dcdd2fcf Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Jun 2 12:06:24 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Jun 2 13:07:17 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 <mike.kagan...@collabora.com> diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 73abcf92abd5..69e884257e33 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -1488,6 +1488,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)