summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2014-06-14 18:20:49 +0100
committerKHobbits <rob@khobbits.co.uk>2014-06-14 18:20:49 +0100
commit71936cfe22bf2e169393cc14c209c49d5de10d04 (patch)
tree3b0869d7f963d3c55d88674e4dcbdb6aac578492
parent27890e2b22dfbd6b731200e97a8c4cfe86c8dbf5 (diff)
downloadEssentials-71936cfe22bf2e169393cc14c209c49d5de10d04.tar
Essentials-71936cfe22bf2e169393cc14c209c49d5de10d04.tar.gz
Essentials-71936cfe22bf2e169393cc14c209c49d5de10d04.tar.lz
Essentials-71936cfe22bf2e169393cc14c209c49d5de10d04.tar.xz
Essentials-71936cfe22bf2e169393cc14c209c49d5de10d04.zip
Check for arraynull on pex group request.
-rw-r--r--Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java b/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java
index 68dc3fe50..cb6d849aa 100644
--- a/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java
+++ b/Essentials/src/com/earth2me/essentials/perm/PermissionsExHandler.java
@@ -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