From a691cd7aa651f552a167d048273f1471c00c93da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 8 Dec 2017 09:59:49 +0000 Subject: [PATCH] crashtesting: crash on import of ooo33887.sxw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since commit a172f854b6e1d61bf0fe0fe4efc3058bb7a760bf Date: Sun Dec 3 21:00:37 2017 +0100 tdf#74693: Footnotes text appearing above footnote separator line When invalidate a footnoteframe, invalidate also the lower textframe, so it will be recalculated before text rendering. Change-Id: I95aec5e86bc53126de71bdebe7fbfada955be9c9 Reviewed-on: https://gerrit.libreoffice.org/46085 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/core/layout/frmtool.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index a9ac9b7c6ea5..73683a400219 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -547,8 +547,11 @@ SwLayNotify::~SwLayNotify() if ( bPos && pLay->Lower() && !IsLowersComplete() ) { pLay->Lower()->InvalidatePos(); - if(pLay->Lower()->IsFootnoteFrame()) - static_cast(pLay->Lower())->Lower()->InvalidatePos(); + SwFootnoteFrame* pFtnFrame = pLay->Lower()->IsFootnoteFrame() ? + static_cast(pLay->Lower()) : nullptr; + SwFrame* pFtnLower = pFtnFrame ? pFtnFrame->Lower() : nullptr; + if (pFtnLower) + pFtnLower->InvalidatePos(); } if ( bPrtPos )