From 67891a1218c8055b0612f5e973b70586eec05ec3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 11 May 2019 17:27:39 +0200 Subject: [PATCH] Fixed a rare ComputerCraft NPE --- .../cr0s/warpdrive/block/TileEntityAbstractInterfaced.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/TileEntityAbstractInterfaced.java b/src/main/java/cr0s/warpdrive/block/TileEntityAbstractInterfaced.java index 91c5d25f..95dac0b7 100644 --- a/src/main/java/cr0s/warpdrive/block/TileEntityAbstractInterfaced.java +++ b/src/main/java/cr0s/warpdrive/block/TileEntityAbstractInterfaced.java @@ -601,8 +601,9 @@ public abstract class TileEntityAbstractInterfaced extends TileEntityAbstractBas @Override @Optional.Method(modid = "computercraft") - public boolean equals(final IPeripheral other) { - return other.hashCode() == hashCode(); + public boolean equals(@Nullable final IPeripheral other) { + return other != null + && other.hashCode() == hashCode(); } // Computer abstraction methods