NPE Prevention

This commit is contained in:
NuclearW 2012-07-07 17:02:33 -04:00
parent f7a5678814
commit 3c7bcb990e

View File

@ -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 // 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)) { if(!(storeIn instanceof PrimitiveExChunkletStore)) {
ChunkletStore tempStore = ChunkletStoreFactory.getChunkletStore(); ChunkletStore tempStore = ChunkletStoreFactory.getChunkletStore();
tempStore.copyFrom(storeIn); if(storeIn != null) {
tempStore.copyFrom(storeIn);
}
storeIn = tempStore; storeIn = tempStore;
} }