From 85a663d1d8d06cf5c83c11fdc08a47fe0308fc98 Mon Sep 17 00:00:00 2001 From: Maxim Mossienko Date: Fri, 21 Jan 2005 13:49:07 +0300 Subject: [PATCH] fixed NPE --- source/com/intellij/codeInsight/editorActions/TypedHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/com/intellij/codeInsight/editorActions/TypedHandler.java b/source/com/intellij/codeInsight/editorActions/TypedHandler.java index 737641bf6bb3..db0ae536cb5b 100644 --- a/source/com/intellij/codeInsight/editorActions/TypedHandler.java +++ b/source/com/intellij/codeInsight/editorActions/TypedHandler.java @@ -371,7 +371,7 @@ public class TypedHandler implements TypedActionHandler { PsiElement elementAt = file.findElementAt(offset-1); // TODO: handle it with insertAfterRParen(...) - if (!JspxCompletionData.isJavaContext(elementAt)) { + if (elementAt!=null && !JspxCompletionData.isJavaContext(elementAt)) { while(!elementAt.getText().startsWith("${")) { elementAt = elementAt.getPrevSibling(); if (elementAt==null) break;