Skip to content

Commit beb28a8

Browse files
committed
check project.isDisposed
1 parent 798edca commit beb28a8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/main/java/org/digma/intellij/plugin/service/EditorInteractionService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ private boolean testConnectionToBackend() {
8787
@Override
8888
public void contextChanged(MethodUnderCaret methodUnderCaret) {
8989

90+
if (project.isDisposed()){
91+
return;
92+
}
93+
9094
//There is no need to execute the contextChanged flow if there is no connection to the backend.
9195
// so testConnectionToBackend will detect a backend connection error , call contextEmptyNoConnection once
9296
// to clean the views, and will return. and will keep blocking until the connection is regained.

src/main/kotlin/org/digma/intellij/plugin/ui/common/NoConnectionWrapper.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ class NoConnectionWrapper(private val project: Project, private val panel: Digma
9393
}
9494

9595
override fun getPreferredFocusableComponent(): JComponent {
96+
97+
if (project.isDisposed){
98+
return this;
99+
}
100+
96101
val backendConnectionMonitor = project.getService(BackendConnectionMonitor::class.java)
97102
return if (backendConnectionMonitor.isConnectionError()) {
98103
this

0 commit comments

Comments
 (0)