[Libreoffice-commits] core.git: sfx2/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 12 15:53:41 UTC 2021


 sfx2/source/appl/module.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1aed4ae13d511de38bd9d350a75b917546617891
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 12 15:50:52 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Aug 12 17:53:04 2021 +0200

    SfxModule optional fields might be empty, cannot unconditionally deref
    
    fallout from
        commit 9ce7ada4530074d95d05efdc89a7eba1032d99e0
        Author: Noel Grandin <noelgrandin at 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 at collabora.com>

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


More information about the Libreoffice-commits mailing list