Skip to content

Commit

Permalink
fix crash on shooting bullet without light
Browse files Browse the repository at this point in the history
  • Loading branch information
IsLilyYaGirl authored May 16, 2020
1 parent a632ad7 commit 7ea8b2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ function updateProjectiles()
v = nil
projectiles[k] = nil
else
v.light:SetPosition(v.x, v.y)
if v.light then
v.light:SetPosition(v.x, v.y)
end
local val = 1
if v.facing == "left" then val = -1 end
love.graphics.draw(v.texture, v.x, v.y, v.angle, val)
Expand Down

0 comments on commit 7ea8b2c

Please sign in to comment.