sw_redlinehide: try to fix UBSAN issue in ~SwContentNode
/sw/source/core/text/txtfrm.cxx:987:16: runtime error: downcast of address 0x2b53270e5890 which does not point to an object of type 'const SwTextNode' 0x2b53270e5890: note: object is of type 'SwContentNode' 00 00 00 00 70 f9 c7 cb 52 2b 00 00 60 5c 7a 00 e0 60 00 00 f0 5b 0e 27 53 2b 00 00 40 15 18 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'SwContentNode' 0 in SwTextFrame::GetTextNodeFirst() const /sw/source/core/text/txtfrm.cxx:987:16 1 in SwFrame::InvalidatePage(SwPageFrame const*) const /sw/source/core/layout/wsfrm.cxx:702:21 2 in SwContentFrame::Cut() /sw/source/core/layout/wsfrm.cxx:1111:5 3 in SwContentNode::DelFrames(bool) /sw/source/core/docnode/node.cxx:1361:9 4 in SwContentNode::~SwContentNode() /sw/source/core/docnode/node.cxx:1017:5 5 in SwTextNode::~SwTextNode() /sw/source/core/txtnode/ndtxt.cxx:270:1 So call this from the ~SwTextNode instead, while it's still a SwTextNode. Also revert the order of resetting the wrong-flags to what it was before b75e052d, as DelFrames_TextNodePart() before DelFrames() will cause the root's SetNeedGrammarCheck to be called, which nobody will notice in practice, but... Change-Id: I0f4f38a484a28dd13a0696bb083300f9ec1e0836 Reviewed-on: https://gerrit.libreoffice.org/55739Reviewed-by:Stephan Bergmann <sbergman@redhat.com> Tested-by:
Jenkins <ci@libreoffice.org>
Showing
Please
register
or
sign in
to comment