Fix problem with null browse index (can be null for browsing withdrawn items - will be set later)

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2643 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2008-02-12 14:54:57 +00:00
parent 175176c0e9
commit fb506433d5

View File

@@ -251,7 +251,7 @@ public abstract class AbstractBrowserServlet extends DSpaceServlet
}
// For second level browses on metadata indexes, we need to adjust the default sorting
if (bi.isMetadataIndex() && scope.isSecondLevel() && scope.getSortBy() <= 0)
if (bi != null && bi.isMetadataIndex() && scope.isSecondLevel() && scope.getSortBy() <= 0)
{
scope.setSortBy(1);
}