fix an exception in save-on-close

GitOrigin-RevId: 4ac8ea80385e87bae35b1956aecda02ee3c8b5cc
This commit is contained in:
Alexey Utkin
2024-08-13 18:29:40 +04:00
committed by intellij-monorepo-bot
parent fa5b4f7f49
commit e147499bcc

View File

@@ -104,7 +104,7 @@ private class PsiAwareTextEditorComponent(file: VirtualFile, editor: EditorImpl)
override fun uiDataSnapshot(sink: DataSink) {
super.uiDataSnapshot(sink)
val project = editor.project
if (project != null) {
if (project != null && !project.isDisposed) {
val lookup = LookupManager.getInstance(project).activeLookup as LookupImpl?
sink[PlatformDataKeys.DOMINANT_HINT_AREA_RECTANGLE] = lookup?.takeIf { it.isVisible }?.bounds
}