summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-09-04 12:37:06 -0400
committerJames Moger <james.moger@gitblit.com>2014-09-04 12:37:06 -0400
commit90c9c9a9af20de464767c7a5726ae7088c6cab3b (patch)
treeb377a55189b4682b15408b4429e6f3971da61687 /src/main/java/com/gitblit/wicket
parent15f1e91fa3b058fd62cf45e572f743d21d8f1280 (diff)
downloadgitblit-90c9c9a9af20de464767c7a5726ae7088c6cab3b.tar.gz
gitblit-90c9c9a9af20de464767c7a5726ae7088c6cab3b.zip
Fix NPE when anonymous admins are editing a repository (issue-490)
Diffstat (limited to 'src/main/java/com/gitblit/wicket')
-rw-r--r--src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java
index f381a45e..200c8dc7 100644
--- a/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java
@@ -56,6 +56,9 @@ public class RepositoryNamePanel extends BasePanel {
GitBlitWebSession session = GitBlitWebSession.get();
UserModel user = session.getUser();
+ if (user == null) {
+ user = UserModel.ANONYMOUS;
+ }
// build project set for repository destination
String defaultPath = null;