summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-07-16 09:09:52 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-07-19 15:54:41 +0200
commit1721cc19fc6d5bd587642a13919e004d4636d7f2 (patch)
tree01abcf4be468dc1aeb43388817e95bbf1c0207ac
parentRemove unused DOCTYPE from odk/examples xcu file (diff)
downloadcore-1721cc19fc6d5bd587642a13919e004d4636d7f2.tar.gz
core-1721cc19fc6d5bd587642a13919e004d4636d7f2.zip
sw: xDictionary may be an empty reference in SID_SPELLCHECK_IGNORE_ALL
Seen in a crashreport: handleFatalSignal ./common/SigUtil.cpp:255 /lib/x86_64-linux-gnu/libpthread.so.0 __restore_rt ??:? program/../program/libswlo.so SwTextShell::Execute(SfxRequest&) sw/source/uibase/shells/textsh1.cxx:1496 Change-Id: I709f361a1396abbb07cea06509afc41bb5f5c9a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119067 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 801b607fc6b3890eb36d310074f1a68db9ae1f5e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119173 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 426c6ee3b4dfe64d07e7e01eefd1d16defa913bf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119176 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index a41c9e9d3d9c..7ebde86a383c 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1505,7 +1505,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
OUString sWord(xSpellAlt->getWord());
linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( xDictionary,
sWord, false, OUString() );
- if (linguistic::DictionaryError::NONE != nAddRes && !xDictionary->getEntry(sWord).is())
+ if (linguistic::DictionaryError::NONE != nAddRes && xDictionary.is() && !xDictionary->getEntry(sWord).is())
{
SvxDicError(rWrtSh.GetView().GetFrameWeld(), nAddRes);
}