[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Tue Dec 19 09:05:31 UTC 2017
sw/source/filter/html/swhtml.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 79aaf397017c2748d965b8b56b0da9177bc26288
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 18 17:17:47 2017 +0000
ofz: Null-deref
Change-Id: I7f59ff4d9db9c769b3ad4ad253160f5d41093f88
Reviewed-on: https://gerrit.libreoffice.org/46734
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 3e92cd43edb3..3860c6407aaf 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -3047,11 +3047,12 @@ bool SwHTMLParser::EndAttr( HTMLAttr* pAttr, bool bChkEmpty )
bInsert = false;
}
- if( bInsert && bScript )
+ const SwTextNode *pTextNd = (bInsert && bScript) ?
+ pAttr->GetSttPara().GetNode().GetTextNode() :
+ nullptr;
+
+ if (pTextNd)
{
- const SwTextNode *pTextNd = pAttr->GetSttPara().GetNode()
- .GetTextNode();
- OSL_ENSURE( pTextNd, "No text node" );
const OUString& rText = pTextNd->GetText();
sal_uInt16 nScriptText = g_pBreakIt->GetBreakIter()->getScriptType(
rText, pAttr->GetSttCnt() );
More information about the Libreoffice-commits
mailing list