summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-04 13:20:21 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-04 13:27:04 +0100
commit5a934b2c6085d4e397e1466f8cd6a813f3c2d9d6 (patch)
treecedc341338f5962e9feacefbb04c43b0ac852a87
parenta015f2c125ebeff895984ff99267918932df529d (diff)
Hack to make an in-destruction SwFlyFrm no longer claim to be one
as observed by -fsanitize=vptr e.g. during CppunitTest_writerperfect_writer (though the true fix might be to prevent all this from happening during ~SwFlyFrm anyway?): SwFrm::FindPageFrm() SwAnchoredObject::FindPageFrmOfAnchor() lcl_NotifyBackgroundOfObj(SwDrawContact&, SdrObject const&, Rectangle const*) SwDrawContact::DisconnectFromLayout(bool) SwDrawContact::DisconnectObjFromLayout(SdrObject*) SwLayoutFrm::Destroy() SwLayoutFrm::~SwLayoutFrm() SwFlyFrm::~SwFlyFrm() SwFlyFreeFrm::~SwFlyFreeFrm() SwFlyLayFrm::~SwFlyLayFrm() SwLayoutFrm::Destroy() SwRootFrm::~SwRootFrm() ... boost::shared_ptr<SwRootFrm>::~shared_ptr() SwViewShell::~SwViewShell() SwCrsrShell::~SwCrsrShell() SwEditShell::~SwEditShell() SwFEShell::~SwFEShell() SwWrtShell::~SwWrtShell() SwView::~SwView() SfxViewFrame::ReleaseObjectShell_Impl() SfxViewFrame::~SfxViewFrame() SfxViewFrame::Close() ... Change-Id: I56d7135044e8682eeaf6ef23c76d4d7beca1eff4
-rw-r--r--sw/source/core/layout/fly.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 529d19459733..8e788e0f5fd0 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -268,6 +268,10 @@ SwFlyFrm::~SwFlyFrm()
}
FinitDrawObj();
+
+ // Hack to make sure code called from base ~SwLayoutFrm does not interpret
+ // this as a SwFlyFrm (which it no longer is by then):
+ mnFrmType = FRM_UNUSED;
}
const IDocumentDrawModelAccess* SwFlyFrm::getIDocumentDrawModelAccess()