Skip to content

Commit

Permalink
Prevent massive NPE chain
Browse files Browse the repository at this point in the history
We should maybe have arg.matchesArgumentType ensure a valueOf won't
return null?
  • Loading branch information
mcmonkey4eva committed Sep 29, 2013
1 parent 4c75e58 commit 15e6111
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -68,6 +68,9 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept
dB.report(getName(), aH.debugObj("location", location) +
aH.debugObj("entities", entities.toString()));

if (location == null)
return;

for (dEntity entity : entities) {
// Call a Bukkit event for compatibility with "on entity teleports"
// world event and other plugins
Expand Down

0 comments on commit 15e6111

Please sign in to comment.