share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
changeset 14797 1aea457856e2
parent 14795 d0ad9fd923fd
child 14897 543729d313f5
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Mon Apr 08 22:16:44 2019 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Mon Apr 08 23:05:54 2019 +0200
@@ -742,7 +742,7 @@
 function CheckChoiceRunawayAll()
   for i= 1, 7 do
     local hog = natives[i]
-    if hog ~= spyHog and GetX(hog) >= runawayX and GetY(hog) >= runawayY and StoppedGear(hog) then
+    if hog ~= nil and GetHealth(hog) and hog ~= spyHog and GetX(hog) >= runawayX and GetY(hog) >= runawayY and StoppedGear(hog) then
       return true
     end
   end