Check for arraynull on pex group request.

This commit is contained in:
KHobbits 2014-06-14 18:20:49 +01:00
parent 27890e2b22
commit 71936cfe22

View File

@ -25,7 +25,14 @@ public class PermissionsExHandler extends SuperpermsHandler
{
return null;
}
return user.getGroupsNames()[0];
String[] groupsNames = user.getGroupsNames();
if (groupsNames == null)
{
return null;
}
return groupsNames[0];
}
@Override
@ -36,7 +43,14 @@ public class PermissionsExHandler extends SuperpermsHandler
{
return null;
}
return Arrays.asList(user.getGroupsNames());
String[] groupsNames = user.getGroupsNames();
if (groupsNames == null)
{
return null;
}
return Arrays.asList(groupsNames);
}
@Override