From 8ad1f6515c6279574ad343596a451bafd593f530 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Fri, 4 Jul 2014 01:19:45 -0500 Subject: [PATCH] Moar Sanity Checking! --- util/Platform.java | 3 +++ util/item/AEItemStack.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/util/Platform.java b/util/Platform.java index 3cbba8bc..ea50dba2 100644 --- a/util/Platform.java +++ b/util/Platform.java @@ -899,6 +899,9 @@ public class Platform public static EntityPlayer getPlayer(WorldServer w) { + if ( w == null ) + throw new NullPointerException(); + EntityPlayer wrp = fakePlayers.get( w ); if ( wrp != null ) return wrp; diff --git a/util/item/AEItemStack.java b/util/item/AEItemStack.java index 1440cd9b..d1750f07 100644 --- a/util/item/AEItemStack.java +++ b/util/item/AEItemStack.java @@ -211,9 +211,13 @@ public final class AEItemStack extends AEStack implements IAEItemS public static IAEItemStack loadItemStackFromNBT(NBTTagCompound i) { + if ( i == null ) + return null; + ItemStack itemstack = ItemStack.loadItemStackFromNBT( i ); if ( itemstack == null ) return null; + AEItemStack aeis = AEItemStack.create( itemstack ); // aeis.priority = i.getInteger( "Priority" ); aeis.stackSize = i.getLong( "Cnt" );