summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2022-12-16 16:57:46 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-12-16 22:25:23 +0000
commit8635c9aa8c6f1078a9e220076d5a08daf30077e8 (patch)
tree0388b8913c67a8812ba8fd6232a5cbe3b9183c57 /sfx2
parent5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec (diff)
Use xKeepAlive instead of m_pData
There is already an instance to keep the incarnation alive, but it was not used. Instead m_pData can indeed get deleted (nullptr), so better use the alive one. Change-Id: Icdb6c841408254142561db408f876618adbc0b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144340 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 9948aadf0d37..bcdc9f1be845 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3259,7 +3259,7 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame
return;
comphelper::OInterfaceContainerHelper2* pIC =
- m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XDocumentEventListener>::get());
+ xKeepAlive->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XDocumentEventListener>::get());
if ( pIC )
{
SAL_INFO("sfx.doc", "SfxDocumentEvent: " + aName);
@@ -3272,7 +3272,7 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame
aDocumentEvent ) );
}
- pIC = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get());
+ pIC = xKeepAlive->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get());
if ( pIC )
{
SAL_INFO("sfx.doc", "SfxEvent: " + aName);