summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-26 21:16:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-26 21:25:19 +0100
commitb418b70f0b168ca03242106d669d3c305ea151fc (patch)
treeec744bedf8b1d6f6d5bf729bf3098d586d41a45f /sw
parent7ce763089b221cd603bba70054e6efb5bdeecbf4 (diff)
coverity#704848 Dereference after null check
Change-Id: I1e0cc28ca52ebabb680d59e3a693a6cefd2e2f9a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/attr/format.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 54ececf5530a..ddd183e33d91 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -304,7 +304,8 @@ void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
// the new one
// skip my own Modify
- if( ((SwFmtChg*)pOldValue)->pChangedFmt != this &&
+ if ( pOldValue && pNewValue &&
+ ((SwFmtChg*)pOldValue)->pChangedFmt != this &&
((SwFmtChg*)pNewValue)->pChangedFmt == DerivedFrom() )
{
// attach Set to new parent