Skip to content

Commit e0b9e40

Browse files
committed
Add a null check in rule reparsing check
1 parent 4ea8edc commit e0b9e40

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ci/io/github/css4j/ci/SampleSitesIT.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,12 @@ private boolean checkDeclarationRule(CSSDeclarationRule rule, int sheetIndex, in
833833
return false;
834834
}
835835

836+
if (other == null) {
837+
reporter.ruleReparseIssue(rule.getParentStyleSheet(), ruleIndex, serializedText,
838+
"Invalid rule.");
839+
return false;
840+
}
841+
836842
BaseCSSStyleDeclaration otherStyle = (BaseCSSStyleDeclaration) other.getStyle();
837843
if (!style.equals(otherStyle) && reportStyleDiff(rule.getParentStyleSheet(), ruleIndex,
838844
style, otherStyle, serializedText)) {

0 commit comments

Comments
 (0)