From bf9de41a7bdc2a0eca71c6a1751a316e501dff9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Wed, 9 Jul 2014 17:21:32 +0200 Subject: [PATCH] Fixed a potential (non-crashing) NPE. --- .../scala/li/cil/oc/common/inventory/ComponentInventory.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/li/cil/oc/common/inventory/ComponentInventory.scala b/src/main/scala/li/cil/oc/common/inventory/ComponentInventory.scala index ef24ad68a..5a12c92a6 100644 --- a/src/main/scala/li/cil/oc/common/inventory/ComponentInventory.scala +++ b/src/main/scala/li/cil/oc/common/inventory/ComponentInventory.scala @@ -139,7 +139,7 @@ trait ComponentInventory extends Inventory with network.Environment { def isComponentSlot(slot: Int) = true protected def connectItemNode(node: Node) { - if (node != null) { + if (this.node != null && node != null) { this.node.connect(node) } }