[debugger] Don't acquire Psi class if project is disposed

GitOrigin-RevId: e679a6a31fe60956021f8e937e6f25352bbad6c8
This commit is contained in:
Nikolay Rykunov
2025-05-10 11:49:48 +02:00
committed by intellij-monorepo-bot
parent 5df113a4a1
commit ee2d03cd0d

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
/*
* Class ExceptionBreakpoint
@@ -85,7 +85,17 @@ public class ExceptionBreakpoint extends Breakpoint<JavaExceptionBreakpointPrope
@Override
public PsiClass getPsiClass() {
return ReadAction.compute(() -> getQualifiedName() != null ? DebuggerUtils.findClass(getQualifiedName(), myProject, GlobalSearchScope.allScope(myProject)) : null);
return ReadAction.compute(() -> {
if (myProject.isDisposed()) {
return null;
}
String qualifiedName = getQualifiedName();
if (qualifiedName == null) {
return null;
}
return DebuggerUtils.findClass(qualifiedName, myProject, GlobalSearchScope.allScope(myProject));
});
}
@Override