Fixed possible crash with network scanning, fixes #1544

This commit is contained in:
raoulvdberge
2017-11-26 11:32:19 +01:00
parent 05a84af1c0
commit c7969c29ca
2 changed files with 7 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
- Fixed Exporter with Stack Upgrade not working correctly in Regulator Mode (raoulvdberge) - Fixed Exporter with Stack Upgrade not working correctly in Regulator Mode (raoulvdberge)
- Fixed crash with the Constructor (raoulvdberge) - Fixed crash with the Constructor (raoulvdberge)
- Fixed patterns being able to crash when no inputs are provided (raoulvdberge) - Fixed patterns being able to crash when no inputs are provided (raoulvdberge)
- Fixed possible crash with network scanning (raoulvdberge)
### 1.5.23 ### 1.5.23
- Fixed duplication bug with autocrafting (raoulvdberge) - Fixed duplication bug with autocrafting (raoulvdberge)

View File

@@ -182,6 +182,8 @@ public class NetworkNodeGraph implements INetworkNodeGraph {
for (EnumFacing checkSide : EnumFacing.VALUES) { for (EnumFacing checkSide : EnumFacing.VALUES) {
if (checkSide != side) { // Avoid going backward if (checkSide != side) { // Avoid going backward
INetworkNodeProxy nodeOnSideProxy = NETWORK_NODE_PROXY_CAPABILITY.cast(tile.getCapability(NETWORK_NODE_PROXY_CAPABILITY, checkSide)); INetworkNodeProxy nodeOnSideProxy = NETWORK_NODE_PROXY_CAPABILITY.cast(tile.getCapability(NETWORK_NODE_PROXY_CAPABILITY, checkSide));
if (nodeOnSideProxy != null) {
INetworkNode nodeOnSide = nodeOnSideProxy.getNode(); INetworkNode nodeOnSide = nodeOnSideProxy.getNode();
if (nodeOnSide == node) { if (nodeOnSide == node) {
@@ -192,4 +194,5 @@ public class NetworkNodeGraph implements INetworkNodeGraph {
} }
} }
} }
}
} }