]> source.dussan.org Git - gitblit.git/commitdiff
Fix NPE when anonymous admins are editing a repository (issue-490) 47/147/1
authorJames Moger <james.moger@gitblit.com>
Thu, 4 Sep 2014 16:37:06 +0000 (12:37 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 4 Sep 2014 16:37:06 +0000 (12:37 -0400)
src/main/java/com/gitblit/wicket/panels/RepositoryNamePanel.java

index f381a45ec7c54de9573328bbf99baaa7a8c94613..200c8dc768a57009101507c0a00610ded7516c03 100644 (file)
@@ -56,6 +56,9 @@ public class RepositoryNamePanel extends BasePanel {
 \r
                GitBlitWebSession session = GitBlitWebSession.get();\r
                UserModel user = session.getUser();\r
+               if (user == null) {\r
+                       user = UserModel.ANONYMOUS;\r
+               }\r
 \r
                // build project set for repository destination\r
                String defaultPath = null;\r