Skip to content

Commit

Permalink
add nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
bgkillas committed Dec 6, 2024
1 parent 4775b2a commit c1ac7f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions quant.ew/files/core/perk_fns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ end

local function spawn_perk(perk_info, auto_pickup_entity)
local x, y = EntityGetTransform(ctx.my_player.entity)
if x == nil then
return
end
local perk_entity = perk_spawn(x, y - 8, perk_info.id)
if auto_pickup_entity then
perk_pickup(perk_entity, auto_pickup_entity, nil, true, false)
Expand Down

0 comments on commit c1ac7f0

Please sign in to comment.