sfx2/source/bastyp/fltfnc.cxx | 3 +++ sfx2/source/view/lokhelper.cxx | 1 + 2 files changed, 4 insertions(+)
New commits: commit 5e6d9c38a7ef4027734064b83ca328df258a575c Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon May 13 14:18:25 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon May 13 20:25:14 2024 +0200 WaE: C6011 Dereferencing NULL pointer warnings Change-Id: Ib7a0f2db7e076eb40f65df5b88d617c459611fbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 8234b10f95e5..3b0fbdcd9478 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -1047,7 +1047,10 @@ void SfxFilterContainer::ReadSingleFilter_Impl( void SfxFilterContainer::ReadFilters_Impl( bool bUpdate ) { if ( !pFilterArr ) + { CreateFilterArr(); + assert(pFilterArr); + } bFirstRead = false; SfxFilterList_Impl& rList = *pFilterArr; diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index d94ef124b0b5..756fda428273 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -190,6 +190,7 @@ void SfxLokHelper::setView(int nId) return; const SfxViewShell* pViewShell = *itViewShell; + assert(pViewShell); DisableCallbacks dc; bool bIsCurrShell = (pViewShell == SfxViewShell::Current());