diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 9517cf3ea..1dd1613ed 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -14,6 +14,7 @@ This document provides a high-level view of the changes introduced by release. - Make wrap-on-typing work for AsciiDoc without chopping an existing line into small chunks (#1653) - Handle YAML parsing errors when showing an editor notification about missing information in the Antora component descriptor (#1753) - Preventing NPE when creating a missing file (#1754) +- Preventing NPE when parsing block attributes for listings (#1755) === 0.43.4 diff --git a/src/main/java/org/asciidoc/intellij/psi/AsciiDocListing.java b/src/main/java/org/asciidoc/intellij/psi/AsciiDocListing.java index d6c2b8a29..532845e59 100644 --- a/src/main/java/org/asciidoc/intellij/psi/AsciiDocListing.java +++ b/src/main/java/org/asciidoc/intellij/psi/AsciiDocListing.java @@ -37,7 +37,7 @@ public boolean validateContent() { AsciiDocBlockAttributes blockAttributes = PsiTreeUtil.findChildOfType(this, AsciiDocBlockAttributes.class); if (blockAttributes != null) { String[] attr = blockAttributes.getAttributes(); - if (attr.length > 0 && attr[0].contains("%novalidate")) { + if (attr != null && attr.length > 0 && attr[0].contains("%novalidate")) { return false; } String opts = blockAttributes.getAttribute("opts");