share/hedgewars/Data/Maps/Control/map.lua
changeset 4767 4ee4a49549e2
parent 4698 6f14ef3e40ae
child 4953 ebd3dae634ca
--- a/share/hedgewars/Data/Maps/Control/map.lua	Tue Dec 28 19:20:30 2010 -0500
+++ b/share/hedgewars/Data/Maps/Control/map.lua	Tue Dec 28 19:32:21 2010 -0500
@@ -200,7 +200,9 @@
 		if CurrentHedgehog ~= nil then		
 			if cOwnerClan[i] == GetHogClan(CurrentHedgehog) then
 				g = AddVisualGear(vCircX[i], vCircY[i], vgtHealthTag, 100, False)
-				SetVisualGearValues(g, vCircX[i], vCircY[i], 0, 0, 0, 0, 0, teamScore[cOwnerClan[i]], 1500, GetClanColor(cOwnerClan[i]))
+                if g ~= 0 then
+				    SetVisualGearValues(g, vCircX[i], vCircY[i], 0, 0, 0, 0, 0, teamScore[cOwnerClan[i]], 1500, GetClanColor(cOwnerClan[i]))
+                end
 			end
 		end
 	end