From 3c5bd3cedd3d5043725625b3f5b180c43eb9e5b3 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 25 Aug 2013 17:35:41 +0200 Subject: [PATCH] Fix a NPE in MobHealthDisplayUpdateTask Band aid for broken isValid() function. Fixes #1396 --- .../gmail/nossr50/runnables/MobHealthDisplayUpdaterTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/MobHealthDisplayUpdaterTask.java b/src/main/java/com/gmail/nossr50/runnables/MobHealthDisplayUpdaterTask.java index c86c298e2..7bf2125ec 100644 --- a/src/main/java/com/gmail/nossr50/runnables/MobHealthDisplayUpdaterTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/MobHealthDisplayUpdaterTask.java @@ -20,7 +20,7 @@ public class MobHealthDisplayUpdaterTask extends BukkitRunnable { @Override public void run() { - if (target.isValid()) { + if (target != null && target.isValid()) { target.setCustomNameVisible(oldNameVisible); target.setCustomName(oldName); target.removeMetadata(mcMMO.customNameKey, mcMMO.p);