Fixed a rare ComputerCraft NPE

This commit is contained in:
Unknown 2019-05-11 17:27:39 +02:00 committed by unknown
parent c0ffd6cd35
commit 67891a1218

View file

@ -601,8 +601,9 @@ public abstract class TileEntityAbstractInterfaced extends TileEntityAbstractBas
@Override @Override
@Optional.Method(modid = "computercraft") @Optional.Method(modid = "computercraft")
public boolean equals(final IPeripheral other) { public boolean equals(@Nullable final IPeripheral other) {
return other.hashCode() == hashCode(); return other != null
&& other.hashCode() == hashCode();
} }
// Computer abstraction methods // Computer abstraction methods