share/hedgewars/Data/Maps/ClimbHome/map.lua
changeset 10593 7d41b0446706
parent 10592 2da35f88db23
child 10598 9dd0f41d3244
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Sun Nov 30 16:06:39 2014 -0500
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Sun Nov 30 16:18:19 2014 -0500
@@ -209,7 +209,7 @@
             Cake = nil
         end
 
-        if GetHealth(Cake) < 999990 and gearIsInCircle(CurrentHedgehog,cx,cy,450) then
+        if Cake ~= nil and GetHealth(Cake) < 999990 and gearIsInCircle(CurrentHedgehog,cx,cy,450) then
             FireBoom(cx,cy,200) -- todo animate
             DeleteGear(Cake)
             Cake = nil