Skip to content

Commit 6e4b6c7

Browse files
authored
Merge pull request #946 from Courseplay/issue-941
Add nil check
2 parents ee194c7 + 2ee3fc7 commit 6e4b6c7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/ai/strategies/AIDriveStrategyShovelSiloLoader.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ function AIDriveStrategyShovelSiloLoader:getDriveData(dt, vX, vY, vZ)
356356
self:setMaxSpeed(0)
357357
else
358358
if self.shovelController:isHighDumpShovel() and
359-
not self.shovelController:isDischarging() then
359+
not self.shovelController:isDischarging() and
360+
self.targetTrailer ~= nil then
360361
--- Makes sure we move slightly forwards,
361362
--- as the high dump offset might not work for
362363
--- unloading of the complete shovel.

0 commit comments

Comments
 (0)