ofz#2340 null deferences on close redlines

Change-Id: I5e270f160f51b7ffa7059dfd17f31d8ec5919a3e
This commit is contained in:
Caolán McNamara
2017-06-21 16:06:03 +01:00
parent 2534ec3639
commit 05e82f9e97

View File

@@ -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);