From 539d939cbd6a02ca043ef535424cda4a65abe5fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 22 May 2018 21:40:43 +0100 Subject: [PATCH] ofz#8473 Null-dereference READ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id6578d180fec3738be127993f02aaf45af915688 Reviewed-on: https://gerrit.libreoffice.org/54682 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/core/unocore/unotext.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 5d9bde6d73a7..5ecc6fbf399b 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -559,7 +559,7 @@ SwXText::insertTextContent( pTmp = pTmp->StartOfSectionNode(); } // if the document starts with a section - while (pOwnStartNode->IsSectionNode()) + while (pOwnStartNode && pOwnStartNode->IsSectionNode()) { pOwnStartNode = pOwnStartNode->StartOfSectionNode(); }