check if editor is already disposed EDU-539 EA-80948
authorliana.bakradze <liana.bakradze@jetbrains.com>
Thu, 24 Mar 2016 11:04:57 +0000 (14:04 +0300)
committerliana.bakradze <liana.bakradze@jetbrains.com>
Thu, 24 Mar 2016 11:04:57 +0000 (14:04 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/navigation/StudyNavigator.java

index 604e2caa9a7d8af288ce84cd8d9117ce7f1b43cc..b54809ef9323bfc55c4df2f5f3e125cab3b41117 100644 (file)
@@ -78,7 +78,7 @@ public class StudyNavigator {
 
   public static  void navigateToAnswerPlaceholder(@NotNull final Editor editor, @NotNull final AnswerPlaceholder answerPlaceholder,
                                                   @NotNull final TaskFile taskFile) {
-    if (!answerPlaceholder.isValid(editor.getDocument())) {
+    if (editor.isDisposed() || !answerPlaceholder.isValid(editor.getDocument())) {
       return;
     }
     LogicalPosition placeholderStart = new LogicalPosition(answerPlaceholder.getLine(), answerPlaceholder.getStart());