summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-12 15:50:52 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-12 17:53:04 +0200
commit1aed4ae13d511de38bd9d350a75b917546617891 (patch)
treedf12d1389c41ff8185fa917e04077e58ec966f59 /sfx2
parentbdec6b189510743bea74ad85b4abff09336a547c (diff)
SfxModule optional fields might be empty, cannot unconditionally deref
fallout from commit 9ce7ada4530074d95d05efdc89a7eba1032d99e0 Author: Noel Grandin <noelgrandin@gmail.com> Date: Wed Aug 11 20:47:36 2021 +0200 flatten SfxInterface_Impl Change-Id: Ib57dd89903ec7f3c73a8466e33e47c4184962620 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120397 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/module.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 6ecb6379513f..441f87e086c8 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -169,13 +169,13 @@ void SfxModule::RegisterStatusBarControl( const SfxStbCtrlFactory& rFact )
SfxTbxCtrlFactArr_Impl* SfxModule::GetTbxCtrlFactories_Impl() const
{
- return &*pImpl->pTbxCtrlFac;
+ return pImpl->pTbxCtrlFac ? &*pImpl->pTbxCtrlFac : nullptr;
}
SfxStbCtrlFactArr_Impl* SfxModule::GetStbCtrlFactories_Impl() const
{
- return &*pImpl->pStbCtrlFac;
+ return pImpl->pStbCtrlFac ? &*pImpl->pStbCtrlFac : nullptr;
}
SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const