summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-04 13:43:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-04 13:43:49 +0100
commitdedc93e973b59ca4d1660fc3820770bf9b072896 (patch)
treee0abbbb2b07be491d9233d93c494e8d58b704b1b /sw
parentdb2c0dc78f11c2764f16e7ca4edaf2cdffc56c64 (diff)
Hack to work around an in-destruction SwTxtNode no longer being one
as observed by -fsanitize=vptr e.g. during CppunitTest_sw_mailmerge (though the true fix might be to prevent all this from happening during ~SwTxtNode anyway?): SwTxtFrm::GetTxtNode() const SwFrm::InvalidatePage(SwPageFrm const*) const SwCntntFrm::Cut() SwCntntNode::DelFrms(bool) SwCntntNode::~SwCntntNode() SwTxtNode::~SwTxtNode() SwNodes::RemoveNode(unsigned long, unsigned long, bool) SwNodes::Delete(SwNodeIndex const&, unsigned long) SwDoc::AppendDoc(SwDoc const&, unsigned short, SwPageDesc*, bool, int) ... Change-Id: Ic3bdf067abba985a0b95d4f0a482a94098341198
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/wsfrm.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index d6ee2fa19416..aea47027e13e 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -435,13 +435,9 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
}
pRoot->SetIdleFlags();
- const SwTxtFrm *pTxtFrm = dynamic_cast< const SwTxtFrm * >(this);
- if (pTxtFrm)
- {
- const SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode();
- if (pTxtNode && pTxtNode->IsGrammarCheckDirty())
- pRoot->SetNeedGrammarCheck( true );
- }
+ const SwTxtNode *pTxtNode = dynamic_cast< const SwTxtNode * >(GetDep());
+ if (pTxtNode && pTxtNode->IsGrammarCheckDirty())
+ pRoot->SetNeedGrammarCheck( true );
}
}