summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/paintfrm.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-06-26 19:09:51 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-06-27 10:43:47 +0200
commit49f971e9d0a88c9f23262445a17c9b5cecdb9167 (patch)
tree76506bb93f87d701c5486e17ab13a8a2b4a35a76 /sw/source/core/layout/paintfrm.cxx
parentf8e4845fec50affc20272600a4baf87554b055fb (diff)
tdf#125751 sw: fix crash on formatting in SwLayoutFrame::PaintSwFrame()
It's less than ideal that the document is painted before being fully formatted, but let's try to apply a band-aid... 0x6120001a97d0 is located 144 bytes inside of 280-byte region [0x6120001a9740,0x6120001a9858) freed by thread T0 here: #1 SwFootnoteFrame::~SwFootnoteFrame() /home/ms/lo/master/sw/source/core/inc/ftnfrm.hxx:64:7 #2 SwFrame::DestroyFrame(SwFrame*) sw/source/core/layout/ssfrm.cxx:389:9 #3 SwContentFrame::Cut() sw/source/core/layout/wsfrm.cxx:1263:25 #4 SwFlowFrame::MoveBwd(bool&) sw/source/core/layout/flowfrm.cxx:2544:17 #5 SwContentFrame::MakeAll(OutputDevice*) sw/source/core/layout/calcmove.cxx:1522:17 #6 SwFrame::PrepareMake(OutputDevice*) sw/source/core/layout/calcmove.cxx:366:5 #7 SwFrame::Calc(OutputDevice*) const sw/source/core/layout/trvlfrm.cxx:1791:37 #8 SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/layout/paintfrm.cxx:3328:17 #9 SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/layout/paintfrm.cxx:3406:21 #10 SwLayoutFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/layout/paintfrm.cxx:3406:21 #11 SwRootFrame::PaintSwFrame(OutputDevice&, SwRect const&, SwPrintData const*) const sw/source/core/layout/paintfrm.cxx:3116:24 #12 SwViewShell::Paint(OutputDevice&, tools::Rectangle const&) sw/source/core/view/viewsh.cxx:1840:34 (reportedly a regression from 18765b9fa739337d2d891513f6e2fb7c3ce23b50) Change-Id: Iff5e783985c180b704b273fa26b7c498820640ac Reviewed-on: https://gerrit.libreoffice.org/74749 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r--sw/source/core/layout/paintfrm.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index a179b7642b1e..61898a818771 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3322,6 +3322,7 @@ void SwLayoutFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect cons
if ( !pFrame )
return;
+ SwFrameDeleteGuard g(const_cast<SwLayoutFrame*>(this)); // lock because Calc() and recursion
SwShortCut aShortCut( *pFrame, rRect );
bool bCnt = pFrame->IsContentFrame();
if ( bCnt )