Tentative fix for occasional null docking instructions in priority AI JS script.

This commit is contained in:
AnotherCommander 2015-12-13 16:23:08 +01:00
parent c4ea08cf9f
commit d98115f54a

View File

@ -6018,10 +6018,13 @@ PriorityAIController.prototype.responseComponent_station_offenceCommittedNearby
PriorityAIController.prototype.responseComponent_docking_shipAchievedDesiredRange = function()
{
var message = this.ship.dockingInstructions.ai_message;
if (message == "APPROACH" || message == "BACK_OFF" || message == "APPROACH_COORDINATES")
if (this.ship.dockingInstructions != null)
{
this.reconsiderNow();
var message = this.ship.dockingInstructions.ai_message;
if (message == "APPROACH" || message == "BACK_OFF" || message == "APPROACH_COORDINATES")
{
this.reconsiderNow();
}
}
}