From 8f6e672ffe19c439aadc07b64e36ae4b83e78f1e Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Mon, 15 Jul 2013 08:09:20 -0400 Subject: [PATCH] Fixed url panel failure when there are no repository urls (issue 269) --- src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java index 3711ca9..aaab2b1 100644 --- a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java @@ -85,7 +85,7 @@ // grab primary url from the top of the list primaryUrl = repositoryUrls.size() == 0 ? null : repositoryUrls.get(0); - boolean canClone = ((primaryUrl.permission == null) || primaryUrl.permission.atLeast(AccessPermission.CLONE)); + boolean canClone = primaryUrl != null && ((primaryUrl.permission == null) || primaryUrl.permission.atLeast(AccessPermission.CLONE)); if (repositoryUrls.size() == 0 || !canClone) { // no urls, nothing to show. -- Gitblit v1.9.1