sw/source/core/doc/doctxm.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit b350937ef36056b2f894063b2bef0362b0ad3091 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Nov 11 14:02:49 2024 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Nov 11 17:30:12 2024 +0100
sw: Dereference before null check Since commit 2a2c4dddf51c0d6ab726a8854123887bbfa7792a Author: Andreas Heinisch <andreas.heini...@yahoo.de> Date: Tue Oct 29 12:11:41 2024 +0100 tdf#153636 - Search for outline node only if index is for the current chapter Change-Id: If969db7c4eee4c542ff99f9d405aa7f1d2a8f414 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176403 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de> diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 75b29613d227..48762a68203d 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -760,6 +760,9 @@ static const SwTextNode* lcl_FindChapterNode(const SwNode& rNd, SwRootFrame cons SwPosition aPos( *pNd ); pNd = GetBodyTextNode( pNd->GetDoc(), aPos, *pFrame ); OSL_ENSURE( pNd, "Where's the paragraph?" ); + if (!pNd) + return nullptr; + // tdf#153636 - search for outline node only if the index is for the current chapter if (bIsFromChapter) // tdf#151462 - search for outline node containing the current node