diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-18 12:53:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-18 17:34:48 +0200 |
commit | 0fe112dbd98b82145bbc68efe00c59764684632b (patch) | |
tree | 3834e5b4bb41434b19efdf306d213aa27e68662a /sw/source/core/layout | |
parent | 453e6fb7c1827d317dc775df32a6cf91b2bb5a67 (diff) |
forcepoint#80 avoid crash
Change-Id: I7a96d2951fbcd5f53a2f7e65e8c07926fc035a11
Reviewed-on: https://gerrit.libreoffice.org/70936
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r-- | sw/source/core/layout/ssfrm.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 902ee811b657..741b942c6850 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -482,6 +482,7 @@ void SwLayoutFrame::DestroyImpl() if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { + bool bFatalError = false; while ( pFrame ) { //First delete the Objs of the Frame because they can't unregister @@ -520,12 +521,19 @@ void SwLayoutFrame::DestroyImpl() } } pFrame->RemoveFromLayout(); - //forcepoint#74, testcase swanchoredobject_considerobjwrapinfluenceonobjpos + // see testForcepoint80 if (pFrame->IsDeleteForbidden()) - throw std::logic_error("DeleteForbidden"); + { + pFrame->AllowDelete(); + bFatalError = true; + } SwFrame::DestroyFrame(pFrame); pFrame = m_pLower; } + + if (bFatalError) + throw std::logic_error("DeleteForbidden"); + //Delete the Flys, the last one also deletes the array. while ( GetDrawObjs() && GetDrawObjs()->size() ) { |