Skip to content

Commit

Permalink
Prevent NPE on /ex foreach
Browse files Browse the repository at this point in the history
It still nulls the values but at least it doesn't blow up the server
  • Loading branch information
mcmonkey4eva committed Sep 2, 2013
1 parent 6981783 commit 3bd7d82
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -112,7 +112,7 @@ else if (arg.matches("-") && bracesEntered == 1) {
args = command.toArray(args);
commands.add(new ScriptEntry(cmd,
args,
scriptEntry.getScript().getContainer()));
scriptEntry.getScript() != null?scriptEntry.getScript().getContainer():null));
commands.get(commands.size() - 1).setPlayer(scriptEntry.getPlayer());
commands.get(commands.size() - 1).setNPC(scriptEntry.getNPC());
if (hyperdebug) dB.echoDebug("Command added: " + cmd + ", with " + String.valueOf(args.length) + " arguments");
Expand Down

0 comments on commit 3bd7d82

Please sign in to comment.