summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-25 10:43:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-25 12:45:20 +0100
commit82f473c87da72a3d7aac80249d408a02caa25afa (patch)
treee4c96ab9e5e791896b539c74f537f8a79b99a448
parent34d6ad3df09ff7a68d00ae69cc03796b1566dfa1 (diff)
fix crash on pressing esc in search/replace dialog
activate can be called during tear down as focus is transferred between widgets as they die Change-Id: Ia8d65b4d3c2e0ea4b8238e598ace0cc0d0e7d738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sfx2/source/dialog/basedlgs.cxx2
-rw-r--r--svx/source/dialog/srchdlg.cxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index fcebc6ea041c..1f10f73ce5e4 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -118,7 +118,7 @@ IMPL_LINK_NOARG(SfxDialogController, FocusChangeHdl, weld::Container&, void)
void SfxModelessDialogController::Activate()
{
- if (!m_xImpl)
+ if (!m_xImpl || !m_xImpl->pMgr)
return;
m_pBindings->SetActiveFrame(m_xImpl->pMgr->GetFrame());
m_xImpl->pMgr->Activate_Impl();
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 06836388a33c..2045730344d4 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -373,6 +373,8 @@ void SvxSearchDialog::ChildWinDispose()
SvxSearchDialog::~SvxSearchDialog()
{
m_aPresentIdle.Stop();
+ pSearchItem.reset();
+ pImpl.reset();
}
void SvxSearchDialog::Construct_Impl()
@@ -598,7 +600,6 @@ bool SvxSearchDialog::IsOtherOptionsExpanded() const
void SvxSearchDialog::Activate()
{
// apply possible transliteration changes of the SvxSearchItem member
- DBG_ASSERT( pSearchItem, "SearchItem missing" );
if (pSearchItem)
{
m_xMatchCaseCB->set_active( pSearchItem->GetExact() );