summaryrefslogtreecommitdiff
path: root/sw/source/core/fields
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-12-09 09:36:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-12-09 13:01:43 +0100
commitcc1bba7d3a683574b2c116ab5be99be81cce93af (patch)
treea56a1bddbd76129263495eb2e7cdfd45b42f1a35 /sw/source/core/fields
parentd1a0360ea90991ec27f503ee655f76faccb081fa (diff)
cid#1470573 Unchecked dynamic_cast
Change-Id: I8489d82a293dc194dac183d3a117f4e256eb8043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107457 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/fields')
-rw-r--r--sw/source/core/fields/usrfld.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 431a3ba0675f..0cff28fd7ba7 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -216,7 +216,7 @@ OUString SwUserFieldType::GetName() const
void SwUserFieldType::SwClientNotify(const SwModify&, const SfxHint& rHint)
{
auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint);
- if(!pLegacy->m_pOld && !pLegacy->m_pNew)
+ if (pLegacy && !pLegacy->m_pOld && !pLegacy->m_pNew)
m_bValidValue = false;
CallSwClientNotify(rHint);