summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-04-25 11:06:11 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-04-27 10:10:25 +0200
commit5dd818ab9c0dc172ff274365754fbd98d576815a (patch)
tree85caa20e816b5ccb06c081baeeedc48901a340e5
parenttdf#141902 Fix domain in ui files (found with ui-checkdomain.sh) (diff)
downloadcore-5dd818ab9c0dc172ff274365754fbd98d576815a.tar.gz
core-5dd818ab9c0dc172ff274365754fbd98d576815a.zip
tdf#141887 SW don't crash on missing SwWrtShell
The code assumes that SwEditWin::Command can just be called, while there is still an m_rView.GetWrtShell(), which is at least not true, if you have an IM in pre-selection and close the Writer window via Window decoration. Change-Id: I67d5f1f917e9b2180037babb8c70c72d75c4a7ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114624 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 9a1c4a10b08ccb8d874a85a2cd984fd71f08c022) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114604 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 0011c032afb96b2b3cfa63f88565e01c84d03512) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114609 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 9ad8275b7b1b..bb0e735ec66f 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5346,15 +5346,15 @@ void SwEditWin::LoseFocus()
void SwEditWin::Command( const CommandEvent& rCEvt )
{
- SwWrtShell &rSh = m_rView.GetWrtShell();
-
- if ( !m_rView.GetViewFrame() )
+ if (!m_rView.GetViewFrame() || isDisposed())
{
// If ViewFrame dies shortly, no popup anymore!
Window::Command(rCEvt);
return;
}
+ SwWrtShell &rSh = m_rView.GetWrtShell();
+
// The command event is send to the window after a possible context
// menu from an inplace client has been closed. Now we have the chance
// to deactivate the inplace client without any problem regarding parent