diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-21 14:44:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-21 15:47:12 +0200 |
commit | d3ba63909740262e0cd64648e2eb00096b4626d2 (patch) | |
tree | 4b3fc0ac0b4018781b6f3eca68f836ed8b227dce /sw | |
parent | 352b87ab15eed0bd9a333dc1d57085fcc6e9aa88 (diff) |
ofz: check for null para
Change-Id: Id31273b2a203414f8ad4f827c334ae17689560af
(cherry picked from commit ebc2abf207c8d903b07f53ecefbca5731edcb1d6)
Reviewed-on: https://gerrit.libreoffice.org/37875
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/filter/ww8/ww8par.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 558b8715a1ed..9190f05c6ca2 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2102,14 +2102,18 @@ void SwWW8ImplReader::Read_HdFtFootnoteText( const SwNodeIndex* pSttIdx, long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes) { WW8PLCFx_SubDoc* pSD = m_pPlcxMan->GetAtn(); - if( !pSD ) + if (!pSD) + return 0; + + const void* pData = pSD->GetData(); + if (!pData) return 0; OUString sAuthor; OUString sInitials; if( m_bVer67 ) { - const WW67_ATRD* pDescri = static_cast<const WW67_ATRD*>(pSD->GetData()); + const WW67_ATRD* pDescri = static_cast<const WW67_ATRD*>(pData); const OUString* pA = GetAnnotationAuthor(SVBT16ToShort(pDescri->ibst)); if (pA) sAuthor = *pA; @@ -2122,7 +2126,7 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes) } else { - const WW8_ATRD* pDescri = static_cast<const WW8_ATRD*>(pSD->GetData()); + const WW8_ATRD* pDescri = static_cast<const WW8_ATRD*>(pData); { const sal_uInt16 nLen = std::min<sal_uInt16>(SVBT16ToShort(pDescri->xstUsrInitl[0]), SAL_N_ELEMENTS(pDescri->xstUsrInitl)-1); |