ofz#8473 Null-dereference READ

Change-Id: Id6578d180fec3738be127993f02aaf45af915688
Reviewed-on: https://gerrit.libreoffice.org/54682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2018-05-22 21:40:43 +01:00
parent 9b2136fb71
commit 539d939cbd

View File

@@ -559,7 +559,7 @@ SwXText::insertTextContent(
pTmp = pTmp->StartOfSectionNode(); pTmp = pTmp->StartOfSectionNode();
} }
// if the document starts with a section // if the document starts with a section
while (pOwnStartNode->IsSectionNode()) while (pOwnStartNode && pOwnStartNode->IsSectionNode())
{ {
pOwnStartNode = pOwnStartNode->StartOfSectionNode(); pOwnStartNode = pOwnStartNode->StartOfSectionNode();
} }