[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Thu Jul 27 20:27:11 UTC 2017
sw/source/filter/ww8/ww8par2.cxx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 6f5841e60ed29ae2577e63623edacc9fe1467ba5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 27 21:23:49 2017 +0100
ofz#2759 null dereference
Change-Id: I23671f0cea592c92a05b34b3cf284a47a73962b1
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 57cb820f2fe4..424d06b862ff 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -434,14 +434,16 @@ long SwWW8ImplReader::Read_Footnote(WW8PLCFManResult* pRes)
if (eEDN == pRes->nSprmId)
{
aDesc.meType = MAN_EDN;
- if (m_xPlcxMan->GetEdn())
- aDesc.mbAutoNum = 0 != *static_cast<short const *>(m_xPlcxMan->GetEdn()->GetData());
+ WW8PLCFx_SubDoc* pEndNote = m_xPlcxMan->GetEdn();
+ if (const void* pData = pEndNote ? pEndNote->GetData() : nullptr)
+ aDesc.mbAutoNum = 0 != *static_cast<short const*>(pData);
}
else
{
aDesc.meType = MAN_FTN;
- if (m_xPlcxMan->GetFootnote())
- aDesc.mbAutoNum = 0 != *static_cast<short const *>(m_xPlcxMan->GetFootnote()->GetData());
+ WW8PLCFx_SubDoc* pFootNote = m_xPlcxMan->GetFootnote();
+ if (const void* pData = pFootNote ? pFootNote->GetData() : nullptr)
+ aDesc.mbAutoNum = 0 != *static_cast<short const*>(pData);
}
aDesc.mnStartCp = pRes->nCp2OrIdx;
More information about the Libreoffice-commits
mailing list