summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-09-23 01:13:34 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-09-23 01:13:34 +0200
commit1b37830b605972649fe54c29fbb952df0e4c9682 (patch)
tree6986523e067103fab44f2d51cd16eb508ea20aa6 /sw
parentbah, >= 4.6 then (diff)
downloadcore-1b37830b605972649fe54c29fbb952df0e4c9682.tar.gz
core-1b37830b605972649fe54c29fbb952df0e4c9682.zip
fdo#39510: comment added
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/newfrm.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 924bdb312463..4504e6ea61fa 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -603,7 +603,17 @@ SwRootFrm::~SwRootFrm()
{
bTurboAllowed = sal_False;
pTurbo = 0;
+ // fdo#39510 crash on document close with footnotes
+ // Object ownership in writer and esp. in layout are a mess: Before the
+ // document/layout split SwDoc and SwRootFrm were essentially one object
+ // and magically/uncleanly worked around their common destruction by call
+ // to SwDoc::IsInDtor() -- even from the layout. As of now destuction of
+ // the layout proceeds forward through the frames. Since SwTxtFtn::DelFrms
+ // also searches backwards to find the master of footnotes, they must be
+ // considered to be owned by the SwRootFrm and also be destroyed here,
+ // before tearing down the (now footnote free) rest of the layout.
AllRemoveFtns();
+
if(pBlink)
pBlink->FrmDelete( this );
if ( static_cast<SwFrmFmt*>(GetRegisteredInNonConst()) )