summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-12 21:09:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-13 10:26:31 +0200
commit2b2152038761839fdd053f69973f1328eb9581b9 (patch)
tree2046e333c264200cb79a5d4c88387f2efa046d0d /sw
parentdbe3f1c451cf834926d0ddf03c29bcbbea87e49c (diff)
coverity#1436922 Dereference before null check
Change-Id: I92dff76a313fb5ab8f4ffc637fc45b57e6e31554 Reviewed-on: https://gerrit.libreoffice.org/55721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/txtfrm.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 27f02f554370..402474391a44 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1981,12 +1981,11 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint)
InvalidatePrt_();
}
- const bool bMergeModify = (m_pMergedPara &&
+ if (nClear || (m_pMergedPara &&
(m_pMergedPara->pParaPropsNode != &rModify ||
- m_pMergedPara->pFirstNode != &rModify));
- const bool bHasOldNew = pOld && pNew;
- if ((nClear || bMergeModify) && bHasOldNew)
+ m_pMergedPara->pFirstNode != &rModify)))
{
+ assert(pOld);
SwAttrSetChg aOldSet( *static_cast<const SwAttrSetChg*>(pOld) );
SwAttrSetChg aNewSet( *static_cast<const SwAttrSetChg*>(pNew) );