don't create editor in air if we can't find an editor for the element (EA-72968 - TDDE: TraceableDisposable.throwDisposalError)

This commit is contained in:
Dmitry Jemerov
2015-09-29 15:36:42 +02:00
parent 4f56821101
commit e70f88c67f
@@ -131,7 +131,7 @@ public abstract class IntentionBasedInspection<TElement : JetElement>(
val editorFactory = EditorFactory.getInstance()
val editors = editorFactory.getEditors(document)
return if (editors.isEmpty()) editorFactory.createEditor(document) else editors[0]
return if (editors.isEmpty()) null else editors[0]
}
}
}