sw/source/core/txtnode/ndtxt.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 98a5dd8ce4ea0fed7fec046d7003bdb0af51e379 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue Jul 4 17:56:05 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Jul 6 15:29:05 2023 +0200 sw: fix crash in SwTextNode::Update FindPageFrame might return nullptr Introduced with c684301352bcca709bc8d1c99e0f08e7096e9716 "(related: tdf#149595) sw: also re-sort SwSortedObjs on SwPageFrame" See https://crashreport.libreoffice.org/stats/signature/SwTextNode::Update(SwContentIndex%20const%20&,long,SwContentIndexReg::UpdateMode) Change-Id: I2e8df1428400f6752eafaaa6102a1fc3de3f0daa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153977 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit a62af0444515ab28bc0ffdc8ff7f320ca962bbc0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154111 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index f46fbdc69c77..8eea1b74f11e 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1603,7 +1603,9 @@ void SwTextNode::Update( pSortedObjs->UpdateAll(); } // also sort the objs on the page frame - pSortedObjs = pFrame->FindPageFrame()->GetSortedObjs(); + if (SwPageFrame *pPage = pFrame->FindPageFrame()) + pSortedObjs = pPage->GetSortedObjs(); + if (pSortedObjs) // doesn't exist yet if called for inserting as-char fly { pSortedObjs->UpdateAll();