summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-02 08:57:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-02 08:57:24 +0000
commitf99de44a02bae5d5e2298be821fc7bcb56bee086 (patch)
treed03a9fe9a21b7f963290f7a8d99bebf9ee073a0d /sd
parent57da1391a3b443db6f07d9be2689d7812940dd29 (diff)
coverity#1420536 Unchecked dynamic_cast
Change-Id: I289f61fe7e9d6b8c37b70a8fce56090c72af9abf
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 6959bd726536..fa89000bddca 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -312,9 +312,11 @@ private:
}
const SvxFieldItem* pFieldItem = findField(rSection);
- if (pFieldItem)
+ const editeng::CustomPropertyField* pCustomPropertyField = pFieldItem ?
+ dynamic_cast<const editeng::CustomPropertyField*>(pFieldItem->GetField()) :
+ nullptr;
+ if (pCustomPropertyField)
{
- const auto* pCustomPropertyField = dynamic_cast<const editeng::CustomPropertyField*>(pFieldItem->GetField());
OUString aKey = pCustomPropertyField->GetName();
if (aKeyCreator.isMarkingTextKey(aKey))
{