summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/html/swhtml.cxx9
1 files changed, 5 insertions, 4 deletions
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() );