From b845f1ff0ad89ba14dbe1a0fdd4e553120f04182 Mon Sep 17 00:00:00 2001 From: James Moger Date: Sun, 11 Nov 2012 14:07:45 -0500 Subject: Empty repository page failed to handle missing repository (issue 160) --- src/com/gitblit/wicket/pages/EmptyRepositoryPage.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/com/gitblit/wicket/pages/EmptyRepositoryPage.java b/src/com/gitblit/wicket/pages/EmptyRepositoryPage.java index ad74af8c..be0dad9e 100644 --- a/src/com/gitblit/wicket/pages/EmptyRepositoryPage.java +++ b/src/com/gitblit/wicket/pages/EmptyRepositoryPage.java @@ -39,6 +39,9 @@ public class EmptyRepositoryPage extends RootPage { String repositoryName = WicketUtils.getRepositoryName(params); RepositoryModel repository = GitBlit.self().getRepositoryModel(repositoryName); + if (repository == null) { + error(getString("gb.canNotLoadRepository") + " " + repositoryName, true); + } if (repository.hasCommits) { // redirect to the summary page if this repository is not empty -- cgit v1.2.3