diff options
Diffstat (limited to 'sw/source/filter/html/swhtml.cxx')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 364fa0a096c1..438f19829935 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -842,9 +842,11 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) } else if (pCurrentNd->GetText().isEmpty()) { - pPos->nContent.Assign( nullptr, 0 ); m_pPam->SetMark(); m_pPam->DeleteMark(); - m_xDoc->GetNodes().Delete( pPos->GetNode() ); + SwNode& rDelNode = pPos->GetNode(); + // move so we don't have a dangling SwContentIndex to the deleted node + m_pPam->GetPoint()->Adjust(SwNodeOffset(+1)); + m_xDoc->GetNodes().Delete( rDelNode ); m_pPam->Move( fnMoveBackward ); } } |