sw/qa/core/data/html/pass/ofz40766-1.html |binary sw/source/core/doc/DocumentContentOperationsManager.cxx | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-)
New commits: commit b3325ef8cdfc2c82eec34e747106f75a9fccb7e4 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Nov 6 16:40:17 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Nov 6 21:14:00 2021 +0100 ofz40766 Null-dereference Change-Id: Ie9df072747311791ac04699cb8c3101a03da7431 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124801 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/qa/core/data/html/pass/ofz40766-1.html b/sw/qa/core/data/html/pass/ofz40766-1.html new file mode 100644 index 000000000000..c0dff9de70f8 Binary files /dev/null and b/sw/qa/core/data/html/pass/ofz40766-1.html differ diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 15ca25c6006c..75cdb398ba7b 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -559,8 +559,10 @@ namespace sw } case CH_TXT_ATR_FIELDSTART: { - auto const pFieldMark(rIDMA.getFieldmarkAt(SwPosition(rTextNode, i))); - startedFields.emplace(pFieldMark, false, 0, 0); + if (auto const pFieldMark = rIDMA.getFieldmarkAt(SwPosition(rTextNode, i))) + startedFields.emplace(pFieldMark, false, 0, 0); + else + SAL_WARN("sw.core", "CH_TXT_ATR_FIELDSTART field mark missing"); break; } case CH_TXT_ATR_FIELDSEP: