summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/swhtml.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/html/swhtml.cxx')
-rw-r--r--sw/source/filter/html/swhtml.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index e483f926ee04..01f15c570a30 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1452,10 +1452,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);