diff options
author | James Moger <james.moger@gitblit.com> | 2013-11-26 08:47:57 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-11-26 08:47:57 -0500 |
commit | 67389b9e7060b7f917a8383ec04d3a0c6bd24c5c (patch) | |
tree | 61c41c8da6c09f2bc64ed1c72c8523d42a11f01c /src/main/java | |
parent | 3daba4304dba818d54eb9b74d8d35df5aab8fee5 (diff) | |
download | gitblit-67389b9e7060b7f917a8383ec04d3a0c6bd24c5c.tar.gz gitblit-67389b9e7060b7f917a8383ec04d3a0c6bd24c5c.zip |
Fix NPE when adding a permission without a registrant (issue-344)
Change-Id: Id6bf070a43072a61a0034bd2d971fc819c9b03e3
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java index b728082b..dd25c48a 100644 --- a/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RegistrantPermissionsPanel.java @@ -261,6 +261,9 @@ public class RegistrantPermissionsPanel extends BasePanel { if (rp.permission == null) { return; } + if (rp.registrant == null) { + return; + } RegistrantAccessPermission copy = DeepCopier.copy(rp); if (StringUtils.findInvalidCharacter(copy.registrant) != null) { copy.permissionType = PermissionType.REGEX; |