Skip to content

Commit f98a82e

Browse files
committed
Fixes case where the annotator would attempt to access an editor that is already disposed (#75)
1 parent 1b508b3 commit f98a82e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/com/intellij/lang/jsgraphql/ide/annotator/JSGraphQLAnnotator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ public void apply(@NotNull PsiFile file, JSGraphQLAnnotationResult annotationRes
8686
if(annotationResult != null) {
8787
try {
8888
final Editor editor = annotationResult.getEditor();
89+
if(editor.isDisposed()) {
90+
return;
91+
}
8992
final String fileName = file.getVirtualFile().getPath();
9093
final List<JSGraphQLErrorResult> errors = Lists.newArrayList();
9194
final JSGraphQLLanguageWarningAnnotator internalAnnotator = new JSGraphQLLanguageWarningAnnotator();

0 commit comments

Comments
 (0)