From 2bb124c365eea38575d0fa4fbd554de90e272267 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 24 Nov 2020 13:06:13 +0000 Subject: ofz#27817 null deref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I16da6f6f78dfd0a4bc17017275a6644d6e4340c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106533 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 48d052a9f1bdbd34e1819b45ab83f51b84911702) --- sw/source/filter/basflt/fltshell.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 5daa1310d810..7d96867acb00 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -659,9 +659,8 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, { SwTextNode const*const pTextNode( aRegion.End()->nNode.GetNode().GetTextNode()); - assert(pTextNode); - SwTextField const*const pField(pTextNode->GetFieldTextAttrAt( - aRegion.End()->nContent.GetIndex() - 1, true)); + SwTextField const*const pField = pTextNode ? pTextNode->GetFieldTextAttrAt( + aRegion.End()->nContent.GetIndex() - 1, true) : nullptr; if (pField) { SwPostItField const*const pPostIt( -- cgit