From 72d4ad039f0275e1a3cfc1946b009db502f7d05a Mon Sep 17 00:00:00 2001 From: Test Date: Mon, 30 Dec 2024 11:52:27 -0600 Subject: [PATCH] bugfix(JB): handle disposed editor tooltips --- .../listeners/ContinuePluginSelectionListener.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt index 4676cae33d..24d9787f5a 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/listeners/ContinuePluginSelectionListener.kt @@ -28,6 +28,10 @@ class ContinuePluginSelectionListener( private var lastActiveEditor: Editor? = null override fun selectionChanged(e: SelectionEvent) { + if (e.editor.isDisposed || e.editor.project?.isDisposed == true) { + return + } + debouncer.debounce { handleSelection(e) } }