From 3bf9d9bc32edad2b3630afa1f44ade2249b6987d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Tue, 18 Jan 2005 14:35:55 +0300 Subject: [PATCH] (no message) --- .../codeInsight/generation/CommentByLineCommentHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java b/source/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java index 94e34f593dbc..7c8a6ab6cf91 100644 --- a/source/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java +++ b/source/com/intellij/codeInsight/generation/CommentByLineCommentHandler.java @@ -580,7 +580,7 @@ public class CommentByLineCommentHandler implements CodeInsightActionHandler, Li final PsiElement elementAt = context.getFile().findElementAt(offset1); final XmlTag tag = PsiTreeUtil.getParentOfType(elementAt, XmlTag.class, false); - if (tag.getName().equals("jsp:scriplet") || tag.getName().equals("jsp:declaration")) { + if (tag == null || tag.getName().equals("jsp:scriplet") || tag.getName().equals("jsp:declaration")) { myJavaComment = true; } }