From: James Moger Date: Thu, 4 Sep 2014 16:37:06 +0000 (-0400) Subject: Fix NPE when anonymous admins are editing a repository (issue-490) X-Git-Tag: v1.6.1~58^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=90c9c9a9af20de464767c7a5726ae7088c6cab3b;p=gitblit.git Fix NPE when anonymous admins are editing a repository (issue-490) --- 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;