sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 091788c95a07932904f132253874d9cd25b6b63b
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Feb 19 16:46:53 2024 +0100
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Mon Feb 19 22:11:47 2024 +0100

    sw: fix crash in SwSpellDialogChildWindow::LockFocusNotification()
    
    Crashreport signature:
    
            Fatal signal received: SIGSEGV code: 128 for address: 0x0
            program/libswlo.so
                    SwSpellDialogChildWindow::GetNextWrongSentence(bool)
                            
sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx:824
            program/libcuilo.so
                    
svx::SpellDialog::GetNextSentence_Impl(std::unique_ptr<UndoChangeGroupGuard, 
std::default_delete<UndoChangeGroupGuard> >*, bool, bool)
                            
/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/stl_vector.h:919
            program/libcuilo.so
                    
svx::SpellDialog::SpellContinue_Impl(std::unique_ptr<UndoChangeGroupGuard, 
std::default_delete<UndoChangeGroupGuard> >*, bool, bool)
                            cui/source/dialogs/SpellDialog.cxx:370
            /opt/collaboraoffice/program/libcuilo.so
                    svx::SpellDialog::InitHdl(void*)
                            
/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173
    
    Change-Id: I0ecae218beb30e5136f7a6f468e3eb9f6e6e5009
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163600
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>

diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx 
b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 44e06191929a..17e31f411ad6 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -821,6 +821,11 @@ bool 
SwSpellDialogChildWindow::SpellDrawText_Impl(SwWrtShell& rSh, svx::SpellPor
 
 void SwSpellDialogChildWindow::LockFocusNotification(bool bLock)
 {
+    if (!m_pSpellState)
+    {
+        return;
+    }
+
     OSL_ENSURE(m_pSpellState->m_bLockFocus != bLock, "invalid locking - no 
change of state");
     m_pSpellState->m_bLockFocus = bLock;
 }

Reply via email to