diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-11-29 08:42:37 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-11-29 09:23:31 +0100 |
commit | d9105d434ac6127f151843c7a7dbcd16257fcc0b (patch) | |
tree | 9184e0286d90f15a79b61994b3cfcdfc0fdc8318 /sfx2 | |
parent | 105196aa00bc0d3e426796f6729a8e7e51271e56 (diff) |
cid#1494452 sfx2: fix null ptr deref in SfxInPlaceClient_Impl::saveObject()
Null-checking "this->m_pClient" suggests that it may be null, but it has
already been dereferenced on all paths leading to the check. Add the
missing check at a previous usage.
Change-Id: I8ebb4f41b9c83d59e65563c26729e899d45881b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126013
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/ipclient.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 08898ba1573f..ce9d2fdfb6c7 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -212,7 +212,7 @@ uno::Reference < frame::XFrame > const & SfxInPlaceClient_Impl::GetFrame() const void SAL_CALL SfxInPlaceClient_Impl::saveObject() { - if (!m_bStoreObject || m_pClient->IsProtected()) + if (!m_bStoreObject || (m_pClient && m_pClient->IsProtected())) // client wants to discard the object (usually it means the container document is closed while an object is active // and the user didn't request saving the changes return; |