[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 24 20:25:25 UTC 2020


 sw/source/filter/basflt/fltshell.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 48d052a9f1bdbd34e1819b45ab83f51b84911702
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 24 13:06:13 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Nov 24 21:24:41 2020 +0100

    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 at redhat.com>

diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 5a6aefa85191..153ccf42a37b 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -631,9 +631,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(


More information about the Libreoffice-commits mailing list