diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-09-26 08:51:10 +0200 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2022-11-09 22:45:02 +0100 |
commit | 2102886f0d79128d2628797c56d20254af2b12be (patch) | |
tree | bb980d28924e52ca415a97c99be8bd606c3b7e3d /cui | |
parent | Fix register clobber information and simplify in the C++/UNO bridge for iOS (diff) | |
download | core-2102886f0d79128d2628797c56d20254af2b12be.tar.gz core-2102886f0d79128d2628797c56d20254af2b12be.zip |
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 <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 5a4c34d325a6206b1a353d54eb4c216fc84c2886)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142444
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index bdb46b8bae29..6e98d7e5af01 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; |