diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-27 16:10:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-27 20:23:32 +0200 |
commit | 877ca303e675ae586caf2787d42756f1e1b22c98 (patch) | |
tree | 8b479302ada6f2c88b126bbca23aa5500550b04b /sw | |
parent | 122ce7b0907ae4705dca2f445444d812e9eeb9f1 (diff) |
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@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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( ) ) { |