sw/source/uibase/docvw/edtwin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 9a1c4a10b08ccb8d874a85a2cd984fd71f08c022 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Sun Apr 25 11:06:11 2021 +0200 Commit: Jan-Marek Glogowski <glo...@fbihome.de> CommitDate: Mon Apr 26 19:24:20 2021 +0200 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 <glo...@fbihome.de> diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 93560ec91f3b..ea0cf5c23e0f 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5357,15 +5357,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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits