don't try to add auto-import if user closed the project while the popup was displayed (EA-67037 - assert: ComponentManagerImpl.getComponent)
This commit is contained in:
@@ -108,7 +108,7 @@ public class KotlinAddImportAction(
|
||||
override fun isAutoSelectionEnabled() = false
|
||||
|
||||
override fun onChosen(selectedValue: Variant?, finalChoice: Boolean): PopupStep<String>? {
|
||||
if (selectedValue == null) return null
|
||||
if (selectedValue == null || project.isDisposed) return null
|
||||
|
||||
if (finalChoice) {
|
||||
addImport(selectedValue)
|
||||
@@ -123,7 +123,7 @@ public class KotlinAddImportAction(
|
||||
}
|
||||
|
||||
override fun onChosen(selectedValue: String?, finalChoice: Boolean): PopupStep<Any>? {
|
||||
if (finalChoice) {
|
||||
if (finalChoice && !project.isDisposed) {
|
||||
AddImportAction.excludeFromImport(project, selectedValue)
|
||||
}
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user