sw/source/core/layout/anchoredobject.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 15ba58dfb4be1920f562927273cc867eb556a3ec Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue May 31 15:06:53 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Jun 1 10:28:23 2022 +0200 sw: fix crash in SwAnchoredObject::UpdateObjInSortedList See https://crashreport.libreoffice.org/stats/signature/SwAnchoredObject::UpdateObjInSortedList() Just a few lines above (line 636) the same checks are used inside the DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION condition so I don't understand why they weren't added here as well Change-Id: Id8ade0a506d5996d9e357d45c20fe56a68a93eec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135188 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 64f8a70298695d1952c3a399e897755ab861add5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135170 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index 23c1e2f17906..c38cfcb03931 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -651,7 +651,8 @@ void SwAnchoredObject::UpdateObjInSortedList() AnchorFrame()->GetDrawObjs()->Update( *this ); // update its position in the sorted object list of its page frame // note: as-character anchored object aren't registered at a page frame - if ( GetFrameFormat().GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR ) + if ( GetPageFrame() && GetPageFrame()->GetSortedObjs() && + GetFrameFormat().GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR ) { GetPageFrame()->GetSortedObjs()->Update( *this ); }