Fix a possible NPE handling the death event (this may have been with an invalid quest.. no stage somehow?)

This commit is contained in:
Nathan Wolf 2015-12-11 19:26:55 -08:00
parent cd4e6dae7a
commit 01e8d5f432

View File

@ -812,7 +812,8 @@ public class PlayerListener implements Listener, ColorUtil {
for (Quest quest : quester.currentQuests.keySet()) {
if (quester.getCurrentStage(quest).deathEvent != null) {
Stage stage = quester.getCurrentStage(quest);
if (stage != null && stage.deathEvent != null) {
quester.getCurrentStage(quest).deathEvent.fire(quester, quest);
}