summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-05 12:44:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-05 13:08:56 +0100
commit0fc0abb549dd299900f64e92272d910281e94413 (patch)
tree2a175bfecac40f5013f7c170059a1e9a8ecc3864 /sw/source/core
parentc90c08a65c480a1012182979d5e9218f17a2ba2e (diff)
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
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/layout/layact.cxx4
-rw-r--r--sw/source/core/layout/sectfrm.cxx5
2 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index ae0a5125f8d1..230769f7e8b5 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 8c374cc5a2d7..5f71d85f2806 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 )