fix segfault caused by last commit if spectating
authorsheepluva
Sun, 22 Mar 2015 22:06:44 +0100
changeset 10867 36ca7a39f34d
parent 10866 c1f75780c56f
child 10868 acb03a9712c3
fix segfault caused by last commit if spectating
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsRender.pas	Sun Mar 22 21:40:16 2015 +0100
+++ b/hedgewars/uGearsRender.pas	Sun Mar 22 22:06:44 2015 +0100
@@ -228,6 +228,9 @@
         if (TeamsArray[i] = CurrentTeam) then
             t:= i;
 
+if t < 0 then
+    exit;
+
 if TeamsArray[t] <> nil then
     begin
     sprH:= SpritesData[sprBigDigit].Height;