Skip to content

Commit 4e6e62b

Browse files
Fix NPE for CompletionsProvider (#206)
Signed-off-by: Jinbo Wang <[email protected]>
1 parent 70c70a5 commit 4e6e62b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

com.microsoft.java.debug.plugin/src/main/java/com/microsoft/java/debug/plugin/internal/CompletionsProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public List<CompletionItem> codeComplete(StackFrame frame, String snippet, int l
4949

5050
try {
5151
IType type = resolveType(frame);
52-
if (type != null) {
52+
if (type != null && type.getCompilationUnit() != null) {
5353
final int offset = JsonRpcHelpers.toOffset(type.getCompilationUnit().getBuffer(), frame.location().lineNumber(), 0);
5454
CompletionProposalRequestor collector = new CompletionProposalRequestor(type.getCompilationUnit(), offset);
5555

0 commit comments

Comments
 (0)