Ensure main station exists before checking its properties
This commit is contained in:
parent
e77882ac51
commit
eeaf83c14a
@ -1364,7 +1364,7 @@ PriorityAIController.prototype.stationAllegiance = function(station)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (allegiance == "neutral" && system.mainStation.position.distanceTo(station) < 51200)
|
||||
if (allegiance == "neutral" && system.mainStation && system.mainStation.position.distanceTo(station) < 51200)
|
||||
{
|
||||
allegiance = "galcop"; // neutral stations in aegis
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user