Skip to content

Commit 7228670

Browse files
committed
fix field with @comment and @hidden throwing npe
1 parent 477bc72 commit 7228670

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/main/java/net/j4c0b3y/api/config/ConfigDocument.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void wipeComments(Block<?> block) {
122122
* @param comment The comment annotation.
123123
*/
124124
protected void setComment(Block<?> block, StaticConfig.Comment comment) {
125-
if (comment != null) {
125+
if (block != null && comment != null) {
126126
setComment(block, Arrays.asList(comment.value()), comment.side());
127127
}
128128
}

0 commit comments

Comments
 (0)