sw/source/core/unocore/unosrch.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 4df2b8274af74058683c5a9cef8620fb083998fa Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Apr 18 19:39:09 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 19 09:42:38 2021 +0200 cid#1476278 silence Null pointer dereferences Change-Id: I8b98551c284d04378fe6dfa254be4f5f09efd9e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114249 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index db0a98b2e7ea..d4816e5b009a 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -150,7 +150,9 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, bool bIsValueSearch) for(auto const & rPair : maValues) { SfxPoolItem* pTempItem = nullptr; - const SfxItemPropertyMapEntry & rPropEntry = *mrMap.getByName(rPair.first); + const SfxItemPropertyMapEntry* pPropEntry = mrMap.getByName(rPair.first); + assert(pPropEntry && "SetProperties only enters values into maValues if mrMap.hasPropertyByName() wass true"); + const SfxItemPropertyMapEntry & rPropEntry = *pPropEntry; sal_uInt16 nWID = rPropEntry.nWID; switch(nWID) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits