Skip to content

Commit

Permalink
prevent lua error #442
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel32019 committed Apr 9, 2022
1 parent 9edc1a0 commit 575381d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Specialization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ function AutoDrive:getCanMotorRun(superFunc)
end
function AutoDrive:getIsAIActive(superFunc)
return superFunc(self) or self.ad.stateModule:isActive()
return superFunc(self) or (self.ad and self.ad.stateModule and self.ad.stateModule:isActive())
end
function AutoDrive:getIsVehicleControlledByPlayer(superFunc)
Expand Down

0 comments on commit 575381d

Please sign in to comment.