Skip to content

Commit 3f639ec

Browse files
forgot a nil check
1 parent 9800e73 commit 3f639ec

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

autotraining.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ function getTrainingSquads()
154154
end
155155

156156
function getTrainingNeed(unit)
157+
if unit == nil then return nil end
157158
local needs = unit.status.current_soul.personality.needs
158159
for _, need in ipairs(needs) do
159160
if need.id == MartialTraining then

0 commit comments

Comments
 (0)