From 9e88172d28edf315676f52ed9a99077e95cd9628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Wed, 24 Mar 2021 11:45:51 +0100 Subject: [PATCH] SfxInPlaceClient: avoid crash when chart deleted by other view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Be sure m_pClient still is valid. In case when one view was in the chart editing mode and other view deleted the slide, m_pClient was cleared in the meantime what caused a crash Change-Id: Ie433946799abef4c75af7b96f3e5cf9ba0e7ec47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113032 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113786 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- sfx2/source/view/ipclient.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 1d3c375b6eb4..3c40c7bdf4a6 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -308,7 +308,8 @@ void SAL_CALL SfxInPlaceClient_Impl::visibilityChanged( sal_Bool bVisible ) throw uno::RuntimeException(); m_pClient->GetViewShell()->OutplaceActivated( bVisible ); - m_pClient->Invalidate(); + if (m_pClient) // it can change in the above code + m_pClient->Invalidate(); }