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/trunk@2644 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2008-02-12 14:59:38 +00:00
parent 64c801a760
commit 02a1297bc7

View File

@@ -253,7 +253,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);
}