Commit 20bfe838 authored by Skylot's avatar Skylot

core: fix null pointer in code annotations getter

parent 39093130
...@@ -126,7 +126,11 @@ public final class JavaClass implements JavaNode { ...@@ -126,7 +126,11 @@ public final class JavaClass implements JavaNode {
private Map<CodePosition, Object> getCodeAnnotations() { private Map<CodePosition, Object> getCodeAnnotations() {
decompile(); decompile();
return cls.getCode().getAnnotations(); CodeWriter code = cls.getCode();
if (code == null) {
return Collections.emptyMap();
}
return code.getAnnotations();
} }
public Map<CodePosition, JavaNode> getUsageMap() { public Map<CodePosition, JavaNode> getUsageMap() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment