sw/source/core/layout/tabfrm.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 4f6ab57c8199142b537796c7c54a626fd7ffe111 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Apr 18 08:53:28 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Apr 18 11:05:04 2025 +0200 crashtesting: null deref on layout of ooo46450-1.odt since: commit b595dff0bf2fcdb63586e36d007408cf23359a65 (HEAD) Date: Fri Apr 11 16:50:43 2025 +0200 tdf#166125 Revert "tdf#158532 sw: fix toolbar buttons remain disabled ... Change-Id: I21bf86ffec48e155d1a1f4b9e6ab40555b77a1dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184350 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index bd2d411dff4f..f65de7960667 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2198,6 +2198,12 @@ static void InvalidateFramePositions(SwFrame * pFrame) } } +static bool IsFirstNonHeadlineRowDeleteForbidden(const SwTabFrame& rFoll) +{ + const SwFrame* pFirstRow = rFoll.GetFirstNonHeadlineRow(); + return pFirstRow && pFirstRow->IsDeleteForbidden(); +} + void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) { if ( IsJoinLocked() || StackHack::IsLocked() || StackHack::Count() > 50 ) @@ -2628,8 +2634,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) if ( !bSplit && GetFollow() ) { bool bDummy; - if (!(HasFollowFlowLine() - && GetFollow()->GetFirstNonHeadlineRow()->IsDeleteForbidden()) + if (!(HasFollowFlowLine() && IsFirstNonHeadlineRowDeleteForbidden(*GetFollow())) && GetFollow()->ShouldBwdMoved(GetUpper(), bDummy)) { SwFrame *pTmp = GetUpper();