summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/atrfld.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-23 20:28:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-23 20:35:32 +0000
commit0abd70662929c5a7b173be1b41dac4dea434b3e1 (patch)
tree17b2b655cc23a0a50bc3fc36901806db43d94453 /sw/source/core/txtnode/atrfld.cxx
parent89f7da7ac180dd15a06bef32f447f997e1fdff03 (diff)
coverity#1158137 Unchecked dynamic_cast
Change-Id: I58b1fe696ab25403838f15928b19460b02a9e97d
Diffstat (limited to 'sw/source/core/txtnode/atrfld.cxx')
-rw-r--r--sw/source/core/txtnode/atrfld.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index e1477f157969..15c7a38c3510 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -96,7 +96,10 @@ SwFmtFld::SwFmtFld( const SwFmtFld& rAttr )
{
// input field in-place editing
SetWhich( RES_TXTATR_INPUTFIELD );
- dynamic_cast<SwInputField*>(GetField())->SetFmtFld( *this );
+ SwInputField *pField = dynamic_cast<SwInputField*>(GetField());
+ assert(pField);
+ if (pField)
+ pField->SetFmtFld( *this );
}
else if ( GetField()->GetTyp()->Which() == RES_POSTITFLD )
{