[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 5 05:09:20 PDT 2015
sw/source/core/layout/layact.cxx | 4 ++++
sw/source/core/layout/sectfrm.cxx | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 0fc0abb549dd299900f64e92272d910281e94413
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 5 12:44:26 2015 +0100
crashtesting: intermittent crash on novell622972-2.html
The pLay here is sometimes getting deleted and then dereferenced afterwards
#20 0x00007f0c95395b23 in SwSectionFrm::~SwSectionFrm()
#21 0x00007f0c95395b6a in SwSectionFrm::~SwSectionFrm()
#22 0x00007f0c953af59d in SwFrm::DestroyFrm(SwFrm*)
#23 0x00007f0c95396d4e in SwSectionFrm::MergeNext(SwSectionFrm*)
#24 0x00007f0c95397e28 in SwSectionFrm::MakeAll(OutputDevice*)
#25 0x00007f0c952d13d5 in SwFrm::PrepareMake(OutputDevice*)
#26 0x00007f0c953cca7f in SwFrm::Calc(OutputDevice*)
#27 0x00007f0c9532d0ea in SwLayAction::FormatLayout(...)
Change-Id: Ib54515bd917333ee9a10f467148d2fe76991cde1
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index ae0a512..230769f 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1223,7 +1223,11 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
aOldRect = static_cast<SwPageFrm*>(pLay)->GetBoundRect(pRenderContext);
}
+ bool const bDeleteForbidden(pLay->IsDeleteForbidden());
+ pLay->ForbidDelete();
pLay->Calc(pRenderContext);
+ if (!bDeleteForbidden)
+ pLay->AllowDelete();
if ( aOldFrame != pLay->Frm() )
bChanged = true;
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 8c374cc..5f71d85 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -424,7 +424,10 @@ bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
|*/
void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
{
- if( !pNxt->IsJoinLocked() && GetSection() == pNxt->GetSection() )
+ if (pNxt->IsDeleteForbidden())
+ return;
+
+ if (!pNxt->IsJoinLocked() && GetSection() == pNxt->GetSection())
{
PROTOCOL( this, PROT_SECTION, ACT_MERGE, pNxt )
More information about the Libreoffice-commits
mailing list