summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-11 09:55:20 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-11 12:11:42 +0000
commit685f84dfc227b98f71e64f3e11a123117ed4e184 (patch)
tree6779a33bd7b898af74f26b8efade6b1acac5778c /sw
parent9827d35990b85f679fcc24518393ac64f7f0e9a3 (diff)
coverity#704933 Unchecked dynamic_cast
Change-Id: Ia094aca7dbc031eb7b3a205deb953ded2b735e5c
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/portxt.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 9529b21c30cf..036d35300bf4 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -957,8 +957,8 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const
{
if ( pBM->GetFieldname( ) == ODF_FORMCHECKBOX )
{ // a checkbox...
- ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM);
- bool checked = pCheckboxFm->IsChecked();
+ const ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM);
+ bool checked = pCheckboxFm && pCheckboxFm->IsChecked();
rInf.DrawCheckBox(*this, checked);
}
else if ( pBM->GetFieldname( ) == ODF_FORMDROPDOWN )