From f839583068439444a23133ef701cb648aa401967 Mon Sep 17 00:00:00 2001 From: j2blake Date: Thu, 21 Jun 2012 19:37:33 +0000 Subject: [PATCH] If the ShortViewService is not found, don't crash. --- .../webapp/web/directives/IndividualShortViewDirective.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/IndividualShortViewDirective.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/IndividualShortViewDirective.java index 981bafbf7..9de08a139 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/IndividualShortViewDirective.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/IndividualShortViewDirective.java @@ -82,6 +82,11 @@ public class IndividualShortViewDirective extends BaseTemplateDirectiveModel { VitroRequest vreq = new VitroRequest( (HttpServletRequest) env.getCustomAttribute("request")); ShortViewService svs = ShortViewServiceSetup.getService(ctx); + if (svs == null) { + log.warn("ShortViewService was not initialized properly."); + return; + } + TemplateAndSupplementalData svInfo = svs.getShortViewInfo(individual, svContext, vreq);