diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-12 21:09:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-13 10:26:31 +0200 |
commit | 2b2152038761839fdd053f69973f1328eb9581b9 (patch) | |
tree | 2046e333c264200cb79a5d4c88387f2efa046d0d /sw | |
parent | dbe3f1c451cf834926d0ddf03c29bcbbea87e49c (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.cxx | 7 |
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) ); |