sw/source/core/layout/sectfrm.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit dd10990aeb7ae2c3afb0c06a3d7b120101cd93c0 Author: Noel Grandin <[email protected]> AuthorDate: Fri Sep 3 15:50:18 2021 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Sep 4 13:36:07 2021 +0200 tdf#144193 fix import crash regression from commit 426930d0c4bd6f782a04a92e8a36e92cd65e186f speedup dynamic_cast to SwTextFrame Change-Id: If602b7166287edfe9a41ac662f1a0b03f283ca83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121603 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index c78007d8f3af..7d1cb799be91 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -203,9 +203,11 @@ void SwSectionFrame::DelEmpty( bool bRemove ) if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) { + auto pNext = FindNextCnt( true ); + auto pPrev = FindPrevCnt(); pViewShell->InvalidateAccessibleParaFlowRelation( - FindNextCnt( true )->DynCastTextFrame(), - FindPrevCnt()->DynCastTextFrame() ); + pNext ? pNext->DynCastTextFrame() : nullptr, + pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } Cut_( bRemove );
