diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-02 08:57:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-02 08:57:24 +0000 |
commit | f99de44a02bae5d5e2298be821fc7bcb56bee086 (patch) | |
tree | d03a9fe9a21b7f963290f7a8d99bebf9ee073a0d /sd | |
parent | 57da1391a3b443db6f07d9be2689d7812940dd29 (diff) |
coverity#1420536 Unchecked dynamic_cast
Change-Id: I289f61fe7e9d6b8c37b70a8fce56090c72af9abf
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 6 |
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)) { |