mirror of
https://github.com/wiremod/wire.git
synced 2025-03-04 03:03:04 -05:00
Fix error when building RuntimeContext with invalid player (#3063)
* Fix E2Lib NULL error * Apply suggestions
This commit is contained in:
parent
a32066ce90
commit
4079111f68
@ -1072,7 +1072,7 @@ end
|
||||
---@param ply userdata
|
||||
function RuntimeContextBuilder:withOwner(ply)
|
||||
self.player = assert(ply)
|
||||
self.uid = (self.player.UniqueID and self.player:UniqueID()) or "World"
|
||||
self.uid = (ply:IsValid() and ply.UniqueID and ply:UniqueID()) or "World"
|
||||
return self
|
||||
end
|
||||
|
||||
@ -1258,4 +1258,4 @@ function E2Lib.compileScript(code, owner)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user