From 4ec84f9b860f640a5fedaf6b1071b2b33cb589f1 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 5 Mar 2014 21:53:50 -0400 Subject: [PATCH] Fixed NPE in EventHookContainer Fixed an NPE that would occur because mod_pocketDim.deathTracker was set to null before the last onWorldSave event was triggered when a server was shutting down. --- .../java/StevenDimDoors/mod_pocketDim/EventHookContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/EventHookContainer.java b/src/main/java/StevenDimDoors/mod_pocketDim/EventHookContainer.java index 7827bd36..8f6c4a3e 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/EventHookContainer.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/EventHookContainer.java @@ -208,7 +208,7 @@ public class EventHookContainer { PocketManager.save(); - if (mod_pocketDim.deathTracker.isModified()) + if (mod_pocketDim.deathTracker != null && mod_pocketDim.deathTracker.isModified()) { mod_pocketDim.deathTracker.writeToFile(); }