cui/source/dialogs/SpellDialog.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit ae1f8a426338770f0dd46c72553c405158415e65
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Sep 28 09:09:03 2022 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Sep 30 14:27:24 2022 +0200

    cui: fix crash in SpellDialog::SpellContinue_Impl
    
    Crashreport signature:
    
    Fatal signal received: SIGSEGV code: 128 for address: 0x0
    program/libcuilo.so
            
svx::SpellDialog::GetNextSentence_Impl(std::unique_ptr<UndoChangeGroupGuard, 
std::default_delete<UndoChangeGroupGuard> >*, bool, bool)
                    include/com/sun/star/uno/Reference.hxx:114
    program/libcuilo.so
            
svx::SpellDialog::SpellContinue_Impl(std::unique_ptr<UndoChangeGroupGuard, 
std::default_delete<UndoChangeGroupGuard> >*, bool, bool)
                    cui/source/dialogs/SpellDialog.cxx:355
    program/libcuilo.so
            svx::SpellDialog::ChangeHdl(weld::Button&)
                    include/rtl/ustring.hxx:527
    program/libmergedlo.so
            Control::ImplCallEventListenersAndHandler(VclEventId, 
std::function<void ()> const&)
                    include/rtl/ref.hxx:208
    program/libmergedlo.so
            Button::Click()
                    
/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/std_function.h:244
    
    Change-Id: I2c7267118213ea7d915a28d77badf93f8ff75683
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140586
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140689
    Tested-by: Jenkins
    (cherry picked from commit 9be24f694d42fc9cae55ed911e0dff7f729803f1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140611
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 5fb079395eb9..49e1415e744e 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -352,6 +352,11 @@ void 
SpellDialog::SpellContinue_Impl(std::unique_ptr<UndoChangeGroupGuard>* pGua
     //then GetNextSentence() has to be called followed again by MarkNextError()
     //MarkNextError is not initially called if the UndoEdit mode is active
     bool bNextSentence = false;
+    if (!m_xSentenceED)
+    {
+        return;
+    }
+
     if(!((!m_xSentenceED->IsUndoEditMode() && m_xSentenceED->MarkNextError( 
bIgnoreCurrentError, xSpell )) ||
             ( bNextSentence = GetNextSentence_Impl(pGuard, bUseSavedSentence, 
m_xSentenceED->IsUndoEditMode()) && m_xSentenceED->MarkNextError( false, xSpell 
))))
         return;

Reply via email to