diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/command/CommandCompletionService.kt b/platform/lang-impl/src/com/intellij/codeInsight/completion/command/CommandCompletionService.kt index 3c40bbf41a54..4f47310777c0 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/command/CommandCompletionService.kt +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/command/CommandCompletionService.kt @@ -358,7 +358,8 @@ private class CommandCompletionHighlightingListener( } override fun dispose() { - clear(lookup.editor) + val lookupEditor = runReadAction { lookup.editor } + clear(lookupEditor) } }