Fixing NPE in SolrPagedSearchController NIHVIVO-2809

This commit is contained in:
briancaruso 2011-06-30 22:41:56 +00:00
parent 98b1a4aba2
commit 5cb9198ada

View file

@ -397,7 +397,8 @@ public class SolrPagedSearchController extends FreemarkerHttpServlet {
if( VitroVocabulary.OWL_THING.equals(typeUri))
continue;
VClass type = vclassDao.getVClassByURI(typeUri);
if( ! type.isAnonymous() &&
if( type != null &&
! type.isAnonymous() &&
type.getName() != null && !"".equals(type.getName()) &&
type.getGroupURI() != null ) //don't display classes that aren't in classgroups
classes.add(type);