sw/source/core/doc/doctxm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 602eb74e50685c27f34e6bf64a600519a52105cb Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Apr 4 09:02:01 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 4 11:43:35 2022 +0200 cid#1503776 Explicit null dereferenced Change-Id: I5dbd0529c7fc445c6330d3540c77050ce843d012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132496 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index df997eb34a43..9e6990247484 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -762,8 +762,8 @@ static bool IsHeadingContained(const SwTextNode* pChptrNd, const SwNode& rNd) Point aPt(0, 0); std::pair<Point, bool> const tmp(aPt, false); - const SwFrame* pChptrFrame = pChptrNd->getLayoutFrame( - pChptrNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp); + const SwFrame* pChptrFrame = pChptrNd ? pChptrNd->getLayoutFrame( + pChptrNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp) : nullptr; const SwPageFrame* pChptrPgFrame = pChptrFrame ? pChptrFrame->FindPageFrame() : nullptr; const SwFrame* pNdFrame = pCNd ? pCNd->getLayoutFrame(