avoid null deref of xIgnoreAll

Change-Id: Ib8e3309c046a74ca13f88fd0a668f3e1d6b909b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161802
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161815
Tested-by: Jenkins
This commit is contained in:
Caolán McNamara 2024-01-08 19:48:47 +00:00 committed by Gökay ŞATIR
parent 6935efb902
commit 4a38047436

View file

@ -417,7 +417,7 @@ void GrammarCheckingIterator::ProcessResult(
for (const linguistic2::SingleProofreadingError &rError : rRes.aErrors)
{
OUString word(rRes.aText.subView(rError.nErrorStart, rError.nErrorLength));
bool ignored = xIgnoreAll->getEntry(word).is();
bool ignored = xIgnoreAll.is() && xIgnoreAll->getEntry(word).is();
if (!ignored)
{