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=refs%2Ftickets%2F47%2F147%2F1;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;