[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/source
Caolán McNamara
caolanm at redhat.com
Fri Jul 28 09:02:27 UTC 2017
sw/source/filter/ww8/ww8par2.cxx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit b78c398817940bbbe0b9ebe848a923cef1856758
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jul 27 21:23:49 2017 +0100
ofz#2759 null dereference
(cherry picked from commit 6f5841e60ed29ae2577e63623edacc9fe1467ba5)
Change-Id: I23671f0cea592c92a05b34b3cf284a47a73962b1
Reviewed-on: https://gerrit.libreoffice.org/40505
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 99feec026987..b84b95729307 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -435,14 +435,16 @@ long SwWW8ImplReader::Read_Footnote(WW8PLCFManResult* pRes)
if (eEDN == pRes->nSprmId)
{
aDesc.meType = MAN_EDN;
- if (m_pPlcxMan->GetEdn())
- aDesc.mbAutoNum = 0 != *static_cast<short const *>(m_pPlcxMan->GetEdn()->GetData());
+ WW8PLCFx_SubDoc* pEndNote = m_pPlcxMan->GetEdn();
+ if (const void* pData = pEndNote ? pEndNote->GetData() : nullptr)
+ aDesc.mbAutoNum = 0 != *static_cast<short const*>(pData);
}
else
{
aDesc.meType = MAN_FTN;
- if (m_pPlcxMan->GetFootnote())
- aDesc.mbAutoNum = 0 != *static_cast<short const *>(m_pPlcxMan->GetFootnote()->GetData());
+ WW8PLCFx_SubDoc* pFootNote = m_pPlcxMan->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