Skip to content

Commit

Permalink
Added nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
schwiti6190 committed Jan 7, 2025
1 parent 5d9e25b commit 9a66685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/ai/jobs/CpAIJobBaleFinder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function CpAIJobBaleFinder:getDescription()
desc = desc .. " - " .. g_i18n:getText("ai_taskDescriptionDriveToField")
elseif currentTask == self.baleFinderTask then
local vehicle = self:getVehicle()
if AIUtil.hasChildVehicleWithSpecialization(vehicle, BaleWrapper) then
if vehicle and AIUtil.hasChildVehicleWithSpecialization(vehicle, BaleWrapper) then
desc = desc .. " - " .. g_i18n:getText("CP_ai_taskDescriptionWrapsBales")
else
desc = desc .. " - " .. g_i18n:getText("CP_ai_taskDescriptionCollectsBales")
Expand Down

0 comments on commit 9a66685

Please sign in to comment.