diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-21 09:29:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-21 12:52:12 +0100 |
commit | 42fe3985ed93d79228f70ecd6d69218fb9c3d41a (patch) | |
tree | 3e986f08181c5a786c757eb37dc2e472f33f3cb0 | |
parent | c6202b2cdacbed5821c8eeec026e9c7d8f69c00e (diff) |
coverity#1430228 Dereference after null check
Change-Id: I15b63e0adba812a84517bae086548441edfab7dc
Reviewed-on: https://gerrit.libreoffice.org/51697
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/doc/docftn.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 8f1c4e43ea1a..ffbb49c35623 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -185,11 +185,10 @@ void SwEndNoteInfo::SwClientNotify( const SwModify& rModify, const SfxHint& rHin if (auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) { const sal_uInt16 nWhich = pLegacyHint->m_pOld ? pLegacyHint->m_pOld->Which() : pLegacyHint->m_pNew ? pLegacyHint->m_pNew->Which() : 0 ; - if( RES_ATTRSET_CHG == nWhich || - RES_FMT_CHG == nWhich ) + if (RES_ATTRSET_CHG == nWhich || RES_FMT_CHG == nWhich) { auto pFormat = GetCurrentCharFormat(pCharFormat != nullptr); - if(!aDepends.IsListeningTo(pFormat) || pFormat->IsFormatInDTOR()) + if (!pFormat || !aDepends.IsListeningTo(pFormat) || pFormat->IsFormatInDTOR()) return; SwDoc* pDoc = pFormat->GetDoc(); SwFootnoteIdxs& rFootnoteIdxs = pDoc->GetFootnoteIdxs(); |