summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dialog
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2024-02-19 16:46:53 +0100
committerMiklos Vajna <vmiklos@collabora.com>2024-02-20 11:37:58 +0100
commitd505b8d2730b93cea8d2dcf2656af37c6c8cc580 (patch)
tree5e1dc76debb3c7ea12bb93ac03ec8d0ee04ac1cc /sw/source/uibase/dialog
parentcca4d8bdcd2ad54a0f353ebbcb26d5eb7b1087d8 (diff)
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/+/163637 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/uibase/dialog')
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 5af09a6adf52..869a0fba0025 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;
}