Skip to content

Commit

Permalink
Fix NullPointerException in PermOverrideData
Browse files Browse the repository at this point in the history
Fixes #1375
  • Loading branch information
MinnDevelopment committed Aug 18, 2020
1 parent a4c15e6 commit 5388904
Showing 1 changed file with 2 additions and 10 deletions.
Expand Up @@ -41,16 +41,8 @@ public PermOverrideData(int type, long id, long allow, long deny)

public PermOverrideData(PermissionOverride override)
{
if (override.isMemberOverride())
{
this.id = override.getMember().getUser().getIdLong();
this.type = MEMBER_TYPE;
}
else
{
this.id = override.getRole().getIdLong();
this.type = ROLE_TYPE;
}
this.id = override.getIdLong();
this.type = override.isMemberOverride() ? MEMBER_TYPE : ROLE_TYPE;
this.allow = override.getAllowedRaw();
this.deny = override.getDeniedRaw();
}
Expand Down

0 comments on commit 5388904

Please sign in to comment.