fix AV when change on SHOW_ONE and only P2 joined

This commit is contained in:
Chris Danford
2005-03-08 20:34:08 +00:00
parent d15a453d15
commit 9cb560ae03
+7 -1
View File
@@ -471,7 +471,13 @@ void OptionRow::UpdateText()
CString sText = m_RowDef.choices[iChoiceWithFocus];
if( CAPITALIZE_ALL_OPTION_NAMES )
sText.MakeUpper();
m_textItems[pn]->SetText( sText );
// If player_no is 2 and there is no player 1:
int index = min( pn, m_textItems.size()-1 );
// TODO: Always have one textItem for each player
m_textItems[index]->SetText( sText );
}
break;
}