From b845f1ff0ad89ba14dbe1a0fdd4e553120f04182 Mon Sep 17 00:00:00 2001 From: James Moger Date: Sun, 11 Nov 2012 14:07:45 -0500 Subject: [PATCH] Empty repository page failed to handle missing repository (issue 160) --- docs/04_releases.mkd | 1 + src/com/gitblit/wicket/pages/EmptyRepositoryPage.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index a8813c50..d0d24fe7 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -12,6 +12,7 @@ The permissions model has changed in this release. #### fixes +- Empty repository page failed to handle missing repository (issue 160) - Fixed broken ticgit urls (issue 157) - Exclude submodules from zip downloads (issue 151) - Fixed bug where repository ownership was not updated on rename user 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 -- 2.39.5