Skip to content

Commit

Permalink
One npe less.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Aug 17, 2013
1 parent f32be17 commit 4b7e424
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -154,7 +154,7 @@ public boolean onCommand(final CommandSender sender, final Command command, fina
// Check sub-commands.
if (args.length > 0){
AbstractCommand<?> subCommand = subCommands.get(args[0].trim().toLowerCase());
if (subCommand.testPermission(sender, command, commandLabel, args)){
if (subCommand != null && subCommand.testPermission(sender, command, commandLabel, args)){
// Sender has permission to run the command.
return subCommand.onCommand(sender, command, commandLabel, args);
}
Expand Down

0 comments on commit 4b7e424

Please sign in to comment.