| commit | 5f03dc914d67725b4d8e949d4e2198c4e9b537ec | [log] |
|---|---|---|
| author | Andreas Heinisch <andreas.heinisch@yahoo.de> | Thu Aug 25 21:53:06 2022 +0200 |
| committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | Sat Aug 27 14:24:23 2022 +0200 |
| tree | 00e067ef45b8e78b5491a4622524ce3e4dab200d | |
| parent | 3895d4c574ac1b6bf02c493494a034bdc5d0a42e [diff] |
tdf#150594 - Prevent crash while searching for the next outline node Change-Id: Ia83968b26f0053815c0da9910aa00f9dde577246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138850 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit 33c6dcfaab35a70f8794a67d31fbec636cb485d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138898 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 8331017..9665c39 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx
@@ -804,8 +804,9 @@ static bool IsHeadingContained(const SwTextNode* pChptrNd, const SwNode& rNd) else { // Search for the next outline node which lies not within the current chapter node while (pChptrNd->GetAttrOutlineLevel() < rONds[nPos]->GetTextNode()->GetAttrOutlineLevel()) while (nPos > 0 && pChptrNd->GetAttrOutlineLevel() < rONds[nPos]->GetTextNode()->GetAttrOutlineLevel()) nPos--; bIsHeadingContained = pChptrNd == rONds[nPos]->GetTextNode(); }