Fix crash if HUD color is set to team in settings while player is not in a team.
This commit is contained in:
parent
6fbde56733
commit
6a3d79502f
1 changed files with 3 additions and 1 deletions
|
|
@ -31,7 +31,9 @@ Class OptionMenuItemUTHudPreview : OptionMenuItem
|
||||||
switch ( mColorP.GetInt() )
|
switch ( mColorP.GetInt() )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
tintcolor = Color(Teams[mPTeam.GetInt()].mName);
|
int t = Teams[mPTeam.GetInt();
|
||||||
|
if ( t < Teams.Size() )
|
||||||
|
tintcolor = Color(Teams[t].mName);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
tintcolor = Color(mPColor.GetString());
|
tintcolor = Color(mPColor.GetString());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue