Kaydet (Commit) 68062b13 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

forcepoint#48 null deref

Change-Id: I790fc6dafc0d8c9783b9dddc266b313af2a046d7
Reviewed-on: https://gerrit.libreoffice.org/56463
Tested-by: Jenkins
Reviewed-by: 's avatarChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit 6725491c)
üst c153a007
...@@ -288,22 +288,25 @@ namespace ...@@ -288,22 +288,25 @@ namespace
::sw::mark::AnnotationMark* const pAnnotationMark = ::sw::mark::AnnotationMark* const pAnnotationMark =
dynamic_cast< ::sw::mark::AnnotationMark* >(ppMark->get()); dynamic_cast< ::sw::mark::AnnotationMark* >(ppMark->get());
if ( pAnnotationMark == nullptr ) if (!pAnnotationMark)
{
continue; continue;
}
const SwPosition& rStartPos = pAnnotationMark->GetMarkStart(); const SwPosition& rStartPos = pAnnotationMark->GetMarkStart();
if ( rStartPos.nNode == nOwnNode ) if (rStartPos.nNode != nOwnNode)
continue;
const SwFormatField* pAnnotationFormatField = pAnnotationMark->GetAnnotationFormatField();
if (!pAnnotationFormatField)
{ {
const SwFormatField* pAnnotationFormatField = pAnnotationMark->GetAnnotationFormatField(); SAL_WARN("sw.core", "missing annotation format field");
assert(pAnnotationFormatField != nullptr); continue;
rAnnotationStartArr.insert(
std::make_shared<SwAnnotationStartPortion_Impl>(
SwXTextField::CreateXTextField(&rDoc,
pAnnotationFormatField),
rStartPos));
} }
rAnnotationStartArr.insert(
std::make_shared<SwAnnotationStartPortion_Impl>(
SwXTextField::CreateXTextField(&rDoc,
pAnnotationFormatField),
rStartPos));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment