From cb966210bd7f7f427b48abe675ee07b45b637dc4 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Fri, 14 Jun 2013 05:14:34 -0400 Subject: [PATCH] Fixed null DDProperties reference in DimData Fixed null DDProperties reference in DimData. Changed the code so that it requests an instance in each of its functions instead of relying on loading a reference when it's first instantiated. I'm not sure how the null references are slipping through, that shouldn't be possible. --- StevenDimDoors/mod_pocketDim/DimData.java | 37 +++++------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/DimData.java b/StevenDimDoors/mod_pocketDim/DimData.java index 37260548..8783e83c 100644 --- a/StevenDimDoors/mod_pocketDim/DimData.java +++ b/StevenDimDoors/mod_pocketDim/DimData.java @@ -33,8 +33,6 @@ public class DimData implements Serializable static final long serialVersionUID = 454342L; - private static DDProperties properties = null; - public DimData(int dimID, boolean isPocket, int depth, LinkData exitLinkData) { this.dimID=dimID; @@ -42,9 +40,6 @@ public class DimData implements Serializable this.isPocket=isPocket; this.exitDimLink= exitLinkData; - - if (properties == null) - properties = DDProperties.instance(); } public DimData(int dimID, boolean isPocket, int depth, int exitLinkDimID, int exitX, int exitY, int exitZ) @@ -59,6 +54,7 @@ public class DimData implements Serializable int i=-range; int j=-range; int k=-range; + DDProperties properties = DDProperties.instance(); while (i