diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-31 14:19:34 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-31 14:19:34 +0000 |
commit | d4d0b1a2b9f11fb7629559e08c345697ba129c04 (patch) | |
tree | 9da3c3ba5c0c85e4d9e39ab936280950ec093109 /sw/source | |
parent | 45e5b5da183e57c80287bf182433f529a0e64bd7 (diff) |
ofz#4848 Null-dereference READ
Change-Id: I632aca7e3f59b7edf48c8c35eff4abf1946af652
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); |