Avoid trying to fetch SD by null URL (test case added)

This commit is contained in:
James Agnew 2020-02-06 11:16:17 -05:00
parent 57136da0bb
commit 076ee562e3
1 changed files with 5 additions and 1 deletions

View File

@ -1720,7 +1720,11 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
ok = true;
break;
}
sd = context.fetchResource(StructureDefinition.class, sd.getBaseDefinition());
if (sd.getBaseDefinition() != null) {
sd = context.fetchResource(StructureDefinition.class, sd.getBaseDefinition());
} else {
sd = null;
}
}
}
}