Skip to content

Commit 7ea8b2c

Browse files
authored
fix crash on shooting bullet without light
1 parent a632ad7 commit 7ea8b2c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/utils.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ function updateProjectiles()
191191
v = nil
192192
projectiles[k] = nil
193193
else
194-
v.light:SetPosition(v.x, v.y)
194+
if v.light then
195+
v.light:SetPosition(v.x, v.y)
196+
end
195197
local val = 1
196198
if v.facing == "left" then val = -1 end
197199
love.graphics.draw(v.texture, v.x, v.y, v.angle, val)

0 commit comments

Comments
 (0)