diff --git a/lua/safespace/sh_dynamic.lua b/lua/safespace/sh_dynamic.lua index 5a1ccb8..7f23fdf 100644 --- a/lua/safespace/sh_dynamic.lua +++ b/lua/safespace/sh_dynamic.lua @@ -192,6 +192,8 @@ function SafeSpace:GetInteriorPortalDimensions(ent) end function SafeSpace:GetExteriorLighting(ent) + if not ent then return end + if not ent:GetDimensions() then return end local dim=ent:GetDimensions() local idim=ent.interior:GetDimensions() local portal=ent:GetPortalDimensions() @@ -385,4 +387,4 @@ function SafeSpace:MakeInterior(ent) ent.Fallback={pos=Vector((-dim.width/2)+dim.size,0,((-dim.height-dim.size)/2))} self:Init(ent) -end \ No newline at end of file +end