From e264f0210d737361748e71ef240cf03b28e580df 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 a28cf6732597..f7489b425da9 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -652,9 +652,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 v1.2.3