cui/source/dialogs/SpellDialog.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 5a4c34d325a6206b1a353d54eb4c216fc84c2886 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Sep 26 08:51:10 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Sep 26 16:25:52 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> diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 329b20d54e29..9f110c6a5aa1 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -351,6 +351,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;