Fix crash if HUD color is set to team in settings while player is not in a team.
This commit is contained in:
parent
c6ac1931b9
commit
d0ff1c35d1
1 changed files with 3 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue