فهرست منبع

NPE Prevention

NuclearW 13 سال پیش
والد
کامیت
3c7bcb990e
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java

+ 3 - 1
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;
         }