Fix for NPE

This commit is contained in:
Georgy Litvinov 2021-03-17 23:36:34 +01:00
parent d2cfbb40b7
commit 48f8902bc7

View file

@ -1164,7 +1164,7 @@ public class TextParser extends Parser {
getTextSP().readStyle(sStyleName,info); getTextSP().readStyle(sStyleName,info);
getTextSP().readParentStyle(sStyleName,info); getTextSP().readParentStyle(sStyleName,info);
Element newNode = node; Element newNode = node;
if (info.hasAttributes() || !"span".equals(info.sTagName)) { if (info.hasAttributes() || info.sTagName != null && !"span".equals(info.sTagName)) {
// We (probably) need to create a new element // We (probably) need to create a new element
newNode = converter.createElement(info.sTagName); newNode = converter.createElement(info.sTagName);
writeStyle(info,newNode); writeStyle(info,newNode);