Skip to content

Commit

Permalink
[Debug] Abort adapter if variable cannot be found
Browse files Browse the repository at this point in the history
This prevents some NPE
  • Loading branch information
mickaelistria committed Feb 8, 2022
1 parent fee42d2 commit f0f243d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion org.eclipse.lsp4e.debug/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Debug Adapter client for Eclipse IDE (Incubation)
Bundle-SymbolicName: org.eclipse.lsp4e.debug;singleton:=true
Bundle-Version: 0.13.2.qualifier
Bundle-Version: 0.13.3.qualifier
Bundle-Activator: org.eclipse.lsp4e.debug.DSPPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ private IVariable getVariableFor(TextSelection selection) {
if (variableName.isEmpty()) {
variableName = findVariableName(document, selection.getOffset());
}
if (variableName == null || variableName.isEmpty()) {
return null;
}

if (Boolean.TRUE.equals(frame.getDebugTarget().getCapabilities().getSupportsEvaluateForHovers())) {
try {
Expand Down

0 comments on commit f0f243d

Please sign in to comment.