Skip to content

Commit

Permalink
Fix null-pointer crash when loading invalid challenge level.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Feb 5, 2019
1 parent 94a54c2 commit 55578ab
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,15 @@ public boolean loadLevel(ChallengeLevel level, boolean overwrite, User user, boo
{
if (!this.isValidLevel(level))
{
user.sendMessage("challenges.admin.import.error",
if (user != null)
{
user.sendMessage("challenges.admin.import.error",
"[object]", level.getFriendlyName());
}
else
{
this.addon.logError("Challenge Level '" + level.getUniqueId() + "' is not valid and skipped");
}

return false;
}
Expand Down

0 comments on commit 55578ab

Please sign in to comment.