[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 21 15:14:37 UTC 2017
sw/source/filter/ww8/writerhelper.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 05e82f9e97d7f44e5eeec68b9d9bc42124624d33
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 21 16:06:03 2017 +0100
ofz#2340 null deferences on close redlines
Change-Id: I5e270f160f51b7ffa7059dfd17f31d8ec5919a3e
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 0737ec419497..c12f5ef6817a 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -754,8 +754,8 @@ namespace sw
nIndex - 1);
sw::mark::IFieldmark *const pFieldMark(
rPos.GetDoc()->getIDocumentMarkAccess()->getFieldmarkFor(end));
- assert(pFieldMark);
- if (pFieldMark->GetMarkPos().nNode.GetIndex() == (*aResult)->m_aMkPos.m_nNode.GetIndex()+1
+ SAL_WARN_IF(!pFieldMark, "sw.ww8", "expected a field mark");
+ if (pFieldMark && pFieldMark->GetMarkPos().nNode.GetIndex() == (*aResult)->m_aMkPos.m_nNode.GetIndex()+1
&& pFieldMark->GetMarkPos().nContent.GetIndex() < (*aResult)->m_aMkPos.m_nContent)
{
(*aResult)->SetEndPos(end);
More information about the Libreoffice-commits
mailing list