diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-06-23 11:10:00 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-06-23 14:14:39 +0200 |
commit | f905d6056606234ba53a26a3e4105ad3560d4b7b (patch) | |
tree | 3480a329c0d55cf5876057b396f874d94ac68518 /sw/source/core/layout/calcmove.cxx | |
parent | bcbdb64a60d88aa19842582a8a8e3f438a0d0642 (diff) |
sw: fix UBSAN error in CppunitTest_sw_odfimport
/sw/source/core/layout/calcmove.cxx:1686:43: runtime error: downcast of address 0x2ae9ba4566c0 which does not point to an object of type 'const SwFootnoteFrame'
0x2ae9ba4566c0: note: object is of type 'SwSectionFrame'
Footnotes can contain sections of course, so use FindFootnoteFrame().
(regression from c83a443eb106e426901d0ba8a809eedcd24c42c5)
Change-Id: I7824c81ba74ed3341f0ba5b14dac89d71f6318db
Reviewed-on: https://gerrit.libreoffice.org/39157
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/core/layout/calcmove.cxx')
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 2fdbb6b4f62f..662d1a5e61f8 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1683,7 +1683,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) aRectFnSet.Refresh(this); if (!bMovedFwd && bFootnote && GetIndPrev() != pPre) { // SwFlowFrame::CutTree() could have formatted and deleted pPre - auto const pPrevFootnoteFrame(static_cast<SwFootnoteFrame const*>(GetUpper())->GetMaster()); + auto const pPrevFootnoteFrame(static_cast<SwFootnoteFrame const*>( + FindFootnoteFrame())->GetMaster()); bool bReset = true; if (pPrevFootnoteFrame) { // use GetIndNext() in case there are sections |