Fixed "Air" tooltip displaying in the interface terminal. More missed null checks.

This commit is contained in:
Gunther De Wachter
2017-06-27 18:00:55 +02:00
parent 66a797dd7c
commit b819fe4adb
2 changed files with 3 additions and 3 deletions
@@ -325,7 +325,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
private boolean itemStackMatchesSearchTerm( final ItemStack itemStack, final String searchTerm ) private boolean itemStackMatchesSearchTerm( final ItemStack itemStack, final String searchTerm )
{ {
if( itemStack == null ) if( itemStack.isEmpty() )
{ {
return false; return false;
} }
@@ -345,7 +345,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
{ {
final ItemStack parsedItemStack = new ItemStack( outTag.getCompoundTagAt( i ) ); final ItemStack parsedItemStack = new ItemStack( outTag.getCompoundTagAt( i ) );
if( parsedItemStack != null ) if( !parsedItemStack.isEmpty() )
{ {
final String displayName = Platform.getItemDisplayName( AEApi.instance().storage().createItemStack( parsedItemStack ) ).toLowerCase(); final String displayName = Platform.getItemDisplayName( AEApi.instance().storage().createItemStack( parsedItemStack ) ).toLowerCase();
if( displayName.contains( searchTerm ) ) if( displayName.contains( searchTerm ) )
@@ -79,7 +79,7 @@ public class SlotDisconnected extends AppEngSlot
@Override @Override
public boolean getHasStack() public boolean getHasStack()
{ {
return this.getStack() != null; return !this.getStack().isEmpty();
} }
@Override @Override