diff --git a/src/main/java/writer2latex/xhtml/style/TextStyleParser.java b/src/main/java/writer2latex/xhtml/style/TextStyleParser.java
index e316f6e..399a30e 100644
--- a/src/main/java/writer2latex/xhtml/style/TextStyleParser.java
+++ b/src/main/java/writer2latex/xhtml/style/TextStyleParser.java
@@ -297,6 +297,9 @@ public class TextStyleParser extends StyleWithPropertiesParser {
//
public void cssText(StyleWithProperties style, Properties props, boolean bInherit) {
+ if (style == null) {
+ return;
+ }
cssTextCommon(style,props,bInherit);
cssTextBackground(style,props,bInherit);
}
@@ -304,6 +307,9 @@ public class TextStyleParser extends StyleWithPropertiesParser {
public void cssTextCommon(StyleWithProperties style, Properties props, boolean bInherit) {
String fontName=null,s2=null,s3=null,s4=null;
CSVList val;
+ if (style == null) {
+ return;
+ }
// Font family
if (bConvertFont && (bInherit || style.getProperty(XMLString.STYLE_FONT_NAME,false)!=null)) {