Duct bridge crash fix

This commit is contained in:
Anuken 2021-09-11 10:07:00 -04:00
parent c5a90759e5
commit 90c2473448

View File

@ -211,7 +211,7 @@ public class DuctBridge extends Block{
public DuctBridgeBuild findLink(){
for(int i = 1; i <= range; i++){
Tile other = tile.nearby(Geometry.d4x(rotation) * i, Geometry.d4y(rotation) * i);
if(other.build instanceof DuctBridgeBuild build && build.team == team){
if(other != null && other.build instanceof DuctBridgeBuild build && build.team == team){
return build;
}
}