Fixed a potential (non-crashing) NPE.

This commit is contained in:
Florian Nücke 2014-07-09 17:21:32 +02:00
parent 5274cb8da0
commit bf9de41a7b

View File

@ -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)
}
}