summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-05-21 14:44:37 +0100
committerAndras Timar <andras.timar@collabora.com>2017-05-30 09:41:22 +0200
commit56392a6821f2ea3358430a0cbc204efc33e6285d (patch)
tree7d6187381469dbd843ae2de56aa16243ba97c583
parent8f515f7d5a9da67c80bd5cbdb69deb3179a2a690 (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> (cherry picked from commit dea663395aa4256b1b0270320d3023fcfd6b4a33)
-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 f13535e64728..503ed16c6d5f 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);