aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-24 13:06:13 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2021-01-25 11:18:51 +0100
commit2bb124c365eea38575d0fa4fbd554de90e272267 (patch)
treefd545c0316fdb0761a1fa8775d14435115c20085
parent8e295f67e93c5e10db7b77052af4cdf27e30e426 (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.cxx5
1 files 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(