[Libreoffice-commits] core.git: sd/source

Caolán McNamara caolanm at redhat.com
Fri Oct 27 07:57:10 UTC 2017


 sd/source/ui/view/drviews2.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 75c642dae3ded5bcf6d48f81363ad918d101d2e5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 26 18:24:38 2017 +0100

    coverity#1420317 Unchecked dynamic_cast
    
    Change-Id: I33d065780ece2aab5f5a07d0dfd5493005a22b33
    Reviewed-on: https://gerrit.libreoffice.org/43917
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 5a5d785f79d7..3b7f2346e219 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -325,9 +325,9 @@ public:
                             for (editeng::Section const & rSection : aSections)
                             {
                                 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->GetKey();
                                     if (aKey.startsWith(sPolicy + "Marking:Text:"))
                                     {


More information about the Libreoffice-commits mailing list