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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 27 18:24:11 UTC 2020


 sw/source/core/text/xmldump.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 877ca303e675ae586caf2787d42756f1e1b22c98
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jun 27 16:10:39 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jun 27 20:23:32 2020 +0200

    cid#1464971 Dereference null return value
    
    Change-Id: Id0f6aec4552e551d3ba697bb4a3c9b0e498fdf24
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97315
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 8ad45ec09eb7..b246006d885a 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -468,7 +468,7 @@ void SwFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
     {
         SwSectionFrame const*const pFrame(static_cast<SwSectionFrame const*>(this));
         SwSectionNode const*const pNode(pFrame->GetSection()->GetFormat()->GetSectionNode());
-        xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("sectionNodeIndex"), TMP_FORMAT, pNode->GetIndex());
+        xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("sectionNodeIndex"), TMP_FORMAT, pNode ? pNode->GetIndex() : -1);
     }
     if ( IsTextFrame(  ) )
     {


More information about the Libreoffice-commits mailing list