[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 4 08:16:30 UTC 2021


 sw/source/uibase/shells/textsh1.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 07838aad2b9b58510b6bb978ad0bd5df6c42acd1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 23 16:55:27 2021 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Oct 4 10:15:49 2021 +0200

    rhbz#1996735 SwEditShell::GetCorrection can return null
    
    Though the exact steps to reproduce are unknown. From the text seen in
    the backtrace the language is possibly Finnish in which case voikko is
    probably the spellchecking backend in use.
    
    (cherry picked from commit ccc30eda6774eb99adc537f9747097e1e8a74b21)
    
    Change-Id: I9b3186e4699946235ccc161575bba7d4a3820565
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123036
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 3ea93b2c5ee4..630d54a2efc6 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1488,7 +1488,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
         else if (sApplyText == sSpellingType)
         {
             SwRect aToFill;
-            uno::Reference< linguistic2::XSpellAlternatives >  xSpellAlt( rWrtSh.GetCorrection(nullptr, aToFill) );
+            uno::Reference<linguistic2::XSpellAlternatives>  xSpellAlt(rWrtSh.GetCorrection(nullptr, aToFill));
+            if (!xSpellAlt.is())
+                return;
             uno::Reference< linguistic2::XDictionary > xDictionary = LinguMgr::GetIgnoreAllList();
             OUString sWord(xSpellAlt->getWord());
             linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( xDictionary,


More information about the Libreoffice-commits mailing list