diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-13 14:18:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-13 14:18:53 +0100 |
commit | cba3f9a144938317ff6c29144222a08ee6a169db (patch) | |
tree | 7a11af5b3102ef17c2ef2918b3fe8cb70497ccae /sw | |
parent | 2c1e951240c9fb6f16159d22396d344449587920 (diff) |
Work around -fsanitize=vptr
Change-Id: Id6e418fb6ae69c6e71e5e52e6e08c1411ea08b65
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 97fd7e0a5c06..a97dfe0068c2 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -2262,7 +2262,10 @@ void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, bool bDel ) BigPtrEntry* pTempEntry = &aTempEntries[nCnt]; BigPtrArray::Replace( nPrevNdIdx+1, pTempEntry ); if( nCnt ) - pPrev = (*this)[ nPrevNdIdx - 1 ]; + pPrev = BigPtrArray::operator []( nPrevNdIdx - 1 ); + // the accessed element can be a naked BigPtrEntry from + // aTempEntries, so the downcast to SwNode* in + // SwNodes::operator[] would be illegal (and unnecessary) } nDelPos = pDel->GetPos() + 1; } |