Fix crash if HUD color is set to team in settings while player is not in a team.

This commit is contained in:
Marisa the Magician 2019-08-08 12:02:48 +02:00
commit d0ff1c35d1

View file

@ -31,7 +31,9 @@ Class OptionMenuItemUTHudPreview : OptionMenuItem
switch ( mColorP.GetInt() )
{
case 0:
tintcolor = Color(Teams[mPTeam.GetInt()].mName);
int t = Teams[mPTeam.GetInt();
if ( t < Teams.Size() )
tintcolor = Color(Teams[t].mName);
break;
case 1:
tintcolor = Color(mPColor.GetString());