summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-04-18 19:39:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-04-19 09:42:38 +0200
commit4df2b8274af74058683c5a9cef8620fb083998fa (patch)
tree27d62cbb167f43d651cd66585a0bdf3780493869 /sw
parenteac00017e34e77343b9ac3638bed9c75115a23fe (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unosrch.cxx4
1 files changed, 3 insertions, 1 deletions
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)
{