mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix NPE introduced by PY-27227 (EA-113959)
This commit is contained in:
@@ -116,7 +116,7 @@ public class PyDebugSupportUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isCurrentPythonDebugProcess(Project project) {
|
||||
public static boolean isCurrentPythonDebugProcess(@NotNull Project project) {
|
||||
XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
|
||||
return session != null && session.getDebugProcess() instanceof PyDebugProcess;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,8 @@ class PySetNextStatementAction : XDebuggerActionBase(true) {
|
||||
override fun getHandler(debuggerSupport: DebuggerSupport) = setNextStatementActionHandler
|
||||
|
||||
override fun isHidden(event: AnActionEvent): Boolean {
|
||||
return !PyDebugSupportUtils.isCurrentPythonDebugProcess(event.getData(CommonDataKeys.PROJECT))
|
||||
val project = event.getData(CommonDataKeys.PROJECT)
|
||||
return project == null || !PyDebugSupportUtils.isCurrentPythonDebugProcess(project)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -58,6 +58,7 @@ public class PyStepIntoMyCodeAction extends XDebuggerActionBase {
|
||||
|
||||
@Override
|
||||
protected boolean isHidden(AnActionEvent event) {
|
||||
return !PyDebugSupportUtils.isCurrentPythonDebugProcess(event.getData(CommonDataKeys.PROJECT));
|
||||
Project project = event.getData(CommonDataKeys.PROJECT);
|
||||
return project == null || !PyDebugSupportUtils.isCurrentPythonDebugProcess(project);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user