From 90c9c9a9af20de464767c7a5726ae7088c6cab3b Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 4 Sep 2014 12:37:06 -0400 Subject: [PATCH] Fix NPE when anonymous admins are editing a repository (issue-490) --- .../java/com/gitblit/wicket/panels/RepositoryNamePanel.java | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5