diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 7376ab23da47..d6ffd1928348 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1462,10 +1462,10 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) if( !aToken.isEmpty() && ' '==aToken[0] && !IsReadPRE() ) { sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex(); - if( nPos ) + const SwTextNode* pTextNode = nPos ? m_pPam->GetPoint()->nNode.GetNode().GetTextNode() : nullptr; + if (pTextNode) { - const OUString& rText = - m_pPam->GetPoint()->nNode.GetNode().GetTextNode()->GetText(); + const OUString& rText = pTextNode->GetText(); sal_Unicode cLast = rText[--nPos]; if( ' ' == cLast || '\x0a' == cLast) aToken = aToken.copy(1); |