sw/source/core/doc/doctxm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 1cccfb05d1aaea33aa370b6f4f080cae95611cd0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Oct 21 14:18:26 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Oct 21 17:34:44 2022 +0200 cid#1516102 Dereference before null check since... commit ba58fc11723b7c9d370d6407385ea0e8829db099 Date: Thu Oct 13 22:11:35 2022 +0200 tdf#151462 - Search for outline node containing the current node Change-Id: Ib0bc51b1c37cb4bc60e61800a2d190eee2b6aa61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141629 Tested-by: Jenkins 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 09c44f1ef489..5578a503dcfd 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -734,10 +734,10 @@ static const SwTextNode* lcl_FindChapterNode( const SwNode& rNd, pNd = GetBodyTextNode( pNd->GetDoc(), aPos, *pFrame ); OSL_ENSURE( pNd, "Where's the paragraph?" ); // tdf#151462 - search for outline node containing the current node - return pNd->FindOutlineNodeOfLevel(pNd->GetSectionLevel() - 1, pLayout); + return pNd ? pNd->FindOutlineNodeOfLevel(pNd->GetSectionLevel() - 1, pLayout) : nullptr; } } - return pNd ? pNd->FindOutlineNodeOfLevel(nLvl, pLayout) : nullptr; + return pNd->FindOutlineNodeOfLevel(nLvl, pLayout); } static bool IsHeadingContained(const SwTextNode* pChptrNd, const SwNode& rNd)