Skip to content

Commit a5d4235

Browse files
committed
fix: potential NPE when Debug Adapter does not support hit condition
1 parent a1c8a6b commit a5d4235

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

org.eclipse.lsp4e.debug/src/org/eclipse/lsp4e/debug/presentation/DSPBreakpointDetailPane.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,13 @@ public void display(final IStructuredSelection selection) {
199199
// Apply capability gating
200200
final var caps = getDebugAdapterCapabilities(); // is null if no debug session is active
201201

202-
final boolean condSupported = caps == null || caps.getSupportsConditionalBreakpoints();
202+
final boolean condSupported = caps == null
203+
|| caps.getSupportsConditionalBreakpoints() != null && caps.getSupportsConditionalBreakpoints();
203204
enableConditionButton.setEnabled(condSupported);
204205
conditionEditor.setEnabled(condSupported);
205206

206-
final boolean hitSupported = caps == null || caps.getSupportsHitConditionalBreakpoints();
207+
final boolean hitSupported = caps == null || caps.getSupportsHitConditionalBreakpoints() != null
208+
&& caps.getSupportsHitConditionalBreakpoints();
207209
enableHitConditionButton.setEnabled(hitSupported);
208210
hitConditionText.setEnabled(hitSupported);
209211
} else {

0 commit comments

Comments
 (0)