summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-21 14:44:37 +0100
committerMichael Stahl <mstahl@redhat.com>2017-05-22 21:59:40 +0200
commitdea663395aa4256b1b0270320d3023fcfd6b4a33 (patch)
tree11a2178ccf54259c9af3d1d587232351eb50b993
parent221de7cfdb6c6b6a4879162652bf842c4358f9eb (diff)
ofz: check for null para
Change-Id: Id31273b2a203414f8ad4f827c334ae17689560af (cherry picked from commit ebc2abf207c8d903b07f53ecefbca5731edcb1d6) Reviewed-on: https://gerrit.libreoffice.org/37876 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/filter/ww8/ww8par.cxx10
1 files changed, 7 insertions, 3 deletions
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);