fix for NPE in an IG

This commit is contained in:
Grahame Grieve 2020-02-24 12:12:09 +11:00
parent 82a4c02a8f
commit a732847f58
1 changed files with 6 additions and 4 deletions

View File

@ -3334,10 +3334,12 @@ public class FHIRPathEngine {
Base res = null;
if (s.startsWith("#")) {
Property p = context.rootResource.getChildByName("contained");
for (Base c : p.getValues()) {
if (chompHash(s).equals(chompHash(c.getIdBase()))) {
res = c;
break;
if (p != null) {
for (Base c : p.getValues()) {
if (chompHash(s).equals(chompHash(c.getIdBase()))) {
res = c;
break;
}
}
}
} else if (hostServices != null) {