fix(client/points): nil index when nearby point is removed (#186)

Co-authored-by: Linden <65407488+thelindat@users.noreply.github.com>
This commit is contained in:
Errorismx
2022-12-30 17:15:12 +07:00
committed by GitHub
parent e59089573a
commit a2772a87b4

View File

@@ -75,7 +75,11 @@ CreateThread(function()
if nearbyCount ~= 0 then if nearbyCount ~= 0 then
tick = SetInterval(function() tick = SetInterval(function()
for i = 1, nearbyCount do for i = 1, nearbyCount do
nearbyPoints[i]:nearby() local point = nearbyPoints[i]
if point then
point:nearby()
end
end end
end) end)
end end