fix NPE in list renderer

This commit is contained in:
Grahame Grieve 2024-03-24 17:48:36 +11:00
parent 81569a3984
commit c7dc4b149e
1 changed files with 2 additions and 2 deletions

View File

@ -212,8 +212,8 @@ public class ListRenderer extends ResourceRenderer {
}
private void shortForRef(XhtmlNode x, Reference ref) throws UnsupportedEncodingException, IOException {
ResourceWithReference r = context.getResolver().resolve(context, ref.getReference());
if (r == null) {
ResourceWithReference r = context.getResolver() == null ? null : context.getResolver().resolve(context, ref.getReference());
if (r == null) {
x.tx(display(ref));
} else {
RendererFactory.factory(r.getResource().getName(), context).renderReference(r.getResource(), x, ref);