From a982c83e66b03d3328340e2a478acb7606fbee5a Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Mon, 20 Apr 2020 18:07:35 +0200 Subject: [PATCH] Fixed NPE --- src/main/java/w2phtml/xhtml/style/TextStyleParser.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/w2phtml/xhtml/style/TextStyleParser.java b/src/main/java/w2phtml/xhtml/style/TextStyleParser.java index ab0ca2c..69324f4 100644 --- a/src/main/java/w2phtml/xhtml/style/TextStyleParser.java +++ b/src/main/java/w2phtml/xhtml/style/TextStyleParser.java @@ -202,8 +202,10 @@ public class TextStyleParser extends StyleWithPropertiesParser { StyleWithProperties style; style = ofr.getTextStyle(visitedStyleName); Properties props = new Properties(";"); - cssText(style, props, true); - cssHyperlink(style, props); + if (style != null) { + cssText(style, props, true); + cssHyperlink(style, props); + } String visitedAnchorDeclarationBlock = props.toString(); return visitedAnchorDeclarationBlock; }