From 3c7bcb990e53435d99e56db1d79e0e4329bca784 Mon Sep 17 00:00:00 2001 From: NuclearW Date: Sat, 7 Jul 2012 17:02:33 -0400 Subject: [PATCH] NPE Prevention --- .../com/gmail/nossr50/util/blockmeta/HashChunkletManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java b/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java index 2223073f0..9c050d435 100644 --- a/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java +++ b/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java @@ -370,7 +370,9 @@ public class HashChunkletManager implements ChunkletManager { // IMPORTANT! If ChunkletStoreFactory is going to be returning something other than PrimitiveEx we need to remove this, as it will be breaking time for old maps if(!(storeIn instanceof PrimitiveExChunkletStore)) { ChunkletStore tempStore = ChunkletStoreFactory.getChunkletStore(); - tempStore.copyFrom(storeIn); + if(storeIn != null) { + tempStore.copyFrom(storeIn); + } storeIn = tempStore; }