diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-11-24 13:06:13 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-10-11 18:11:19 +0200 |
commit | 7be8ca2d7d2dc9f8cb8c10062de680035989d827 (patch) | |
tree | b71f37bcbd7bb7a6b3696e715fabeed2b4737375 | |
parent | 3cabe076684d193145f84243945afb0cc271bb7b (diff) |
ofz#27817 null deref
Change-Id: I16da6f6f78dfd0a4bc17017275a6644d6e4340c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106533
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 48d052a9f1bdbd34e1819b45ab83f51b84911702)
-rw-r--r-- | sw/source/filter/basflt/fltshell.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index bfd9d621a8e2..209e4ad0dfe3 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( |