diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java index 66421a2e4176..47830b9cba64 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IndentsPass.java @@ -545,7 +545,16 @@ public class IndentsPass extends TextEditorHighlightingPass implements DumbAware Language language = tokenType.getLanguage(); TokenSet comments = myComments.get(language); if (comments == null) { - myComments.put(language, comments = LanguageParserDefinitions.INSTANCE.forLanguage(language).getCommentTokens()); + ParserDefinition definition = LanguageParserDefinitions.INSTANCE.forLanguage(language); + if (definition != null) { + comments = definition.getCommentTokens(); + } + if (comments == null) { + return fallbackColumn; + } + else { + myComments.put(language, comments); + } } if (comments.contains(tokenType) && indentOffset == it.getStart()) { String prefix = COMMENT_PREFIXES.get(tokenType);