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:45:15 +0200 |
commit | e264f0210d737361748e71ef240cf03b28e580df (patch) | |
tree | b7884140d0e532e15e90d0244e11eb221fd2ca31 | |
parent | 516d8e79dbf50661e5a4f1fc171ac57fb7394d29 (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 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( |