removing anonymous heads from 0.9.9 0.9.9
authorkoda
Mon, 22 Jul 2013 21:31:48 +0200
branch0.9.9
changeset 1737 3efca26eb91e
parent 1734 ee7059418043 (diff)
parent 1735 86c291985add (current diff)
child 1739 76d47aa70290
removing anonymous heads from 0.9.9
--- a/hedgewars/uVisualGears.pas	Mon Jul 22 21:30:35 2013 +0200
+++ b/hedgewars/uVisualGears.pas	Mon Jul 22 21:31:48 2013 +0200
@@ -56,13 +56,18 @@
 
 procedure AddDamageTag(X, Y, Damage, Color: LongWord);
 var s: shortstring;
+	Gear: PVisualGear;
 begin
 if cAltDamage then
-	with AddVisualGear(X, Y, vgtSmallDamageTag)^ do
-		begin
-		str(Damage, s);
-		Tex:= RenderStringTex(s, Color, fntSmall);
-		end;
+	begin
+	Gear:= AddVisualGear(X, Y, vgtSmallDamageTag);
+	if Gear <> nil then
+		with Gear^ do
+			begin
+			str(Damage, s);
+			Tex:= RenderStringTex(s, Color, fntSmall);
+			end
+	end
 end;