From d059d4f00d9f72473ed685d1eb8544e329a518dd Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 6 Dec 2015 01:13:12 +0100 Subject: [PATCH] Fix possible NPE - permissions in CommandDescriptions can be null - Fix missed null situation during previous code changes --- .../java/fr/xephi/authme/permission/PermissionsManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java index 52e942266..63d755e86 100644 --- a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java +++ b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java @@ -328,7 +328,8 @@ public class PermissionsManager implements PermissionsService { } public boolean hasPermission(Player player, CommandDescription command) { - if (CollectionUtils.isEmpty(command.getCommandPermissions().getPermissionNodes())) { + if (command.getCommandPermissions() == null + || CollectionUtils.isEmpty(command.getCommandPermissions().getPermissionNodes())) { return true; }