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 { private void shortForRef(XhtmlNode x, Reference ref) throws UnsupportedEncodingException, IOException {
ResourceWithReference r = context.getResolver().resolve(context, ref.getReference()); ResourceWithReference r = context.getResolver() == null ? null : context.getResolver().resolve(context, ref.getReference());
if (r == null) { if (r == null) {
x.tx(display(ref)); x.tx(display(ref));
} else { } else {
RendererFactory.factory(r.getResource().getName(), context).renderReference(r.getResource(), x, ref); RendererFactory.factory(r.getResource().getName(), context).renderReference(r.getResource(), x, ref);