mirror of
https://github.com/APercy/airutils
synced 2025-09-28 05:26:23 +02:00
fix crash on destruction
This commit is contained in:
parent
fad724b479
commit
ad7a644355
@ -1133,9 +1133,11 @@ function airutils.seats_update(self)
|
||||
end
|
||||
|
||||
function airutils.seats_destroy(self)
|
||||
local max_seats = table.getn(self._passengers_base)
|
||||
local max_seats = table.getn(self._seats)
|
||||
for i=1, max_seats do
|
||||
if self._passengers_base[i] then self._passengers_base[i]:remove() end
|
||||
if self._passengers_base and self._passengers_base[i] then
|
||||
if self._passengers_base[i] ~= 0 then self._passengers_base[i]:remove() end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user