Update Scenery.lua (#1980) (#1981)

_id might be nil in :FindByZoneName()
This commit is contained in:
Thomas 2023-08-01 10:38:39 +02:00 committed by GitHub
parent 56fcd8f37f
commit 677a64c3dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,7 @@ function SCENERY:FindByZoneName( ZoneName )
zone = ZONE:FindByName(ZoneName) zone = ZONE:FindByName(ZoneName)
end end
local _id = zone:GetProperty('OBJECT ID') local _id = zone:GetProperty('OBJECT ID')
BASE:T("Object ID ".._id) --BASE:T("Object ID ".._id)
if not _id then if not _id then
-- this zone has no object ID -- this zone has no object ID
BASE:E("**** Zone without object ID: "..ZoneName.." | Type: "..tostring(zone.ClassName)) BASE:E("**** Zone without object ID: "..ZoneName.." | Type: "..tostring(zone.ClassName))