sw/source/filter/ww8/ww8par.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit dea663395aa4256b1b0270320d3023fcfd6b4a33 Author: Caolán McNamara <caol...@redhat.com> Date: Sun May 21 14:44:37 2017 +0100 ofz: check for null para Change-Id: Id31273b2a203414f8ad4f827c334ae17689560af (cherry picked from commit ebc2abf207c8d903b07f53ecefbca5731edcb1d6) Reviewed-on: https://gerrit.libreoffice.org/37876 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index cd6213e5f26d..6757e3c3ec34 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2167,14 +2167,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; @@ -2187,7 +2191,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);
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits