fix logic of enabling Override Methods in Python (PY-1132)

This commit is contained in:
Dmitry Jemerov
2010-06-24 18:49:15 +04:00
parent c4265ea3e5
commit a679f3af29
@@ -39,7 +39,7 @@ public class PyOverrideImplementUtil {
if (element == null) {
// are we in whitespace after last class? PY-440
final PsiElement lastChild = file.getLastChild();
if (lastChild instanceof PsiWhiteSpace &&
if (lastChild != null &&
offset >= lastChild.getTextRange().getStartOffset() &&
offset <= lastChild.getTextRange().getEndOffset()) {
element = lastChild;