Fix obscure crash.
This commit is contained in:
@@ -77,21 +77,17 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi
|
|||||||
{
|
{
|
||||||
LOG->Trace( "ScreenOptions::Set()" );
|
LOG->Trace( "ScreenOptions::Set()" );
|
||||||
|
|
||||||
CHECKPOINT;
|
|
||||||
|
|
||||||
m_InputMode = im;
|
m_InputMode = im;
|
||||||
m_OptionRow = OptionRows;
|
m_OptionRow = OptionRows;
|
||||||
m_iNumOptionRows = iNumOptionLines;
|
m_iNumOptionRows = iNumOptionLines;
|
||||||
m_bLoadExplanations = bLoadExplanations;
|
m_bLoadExplanations = bLoadExplanations;
|
||||||
|
|
||||||
CHECKPOINT;
|
|
||||||
|
|
||||||
this->ImportOptions();
|
this->ImportOptions();
|
||||||
for( unsigned l=0; l<MAX_OPTION_LINES; l++ )
|
|
||||||
|
for( unsigned l=0; l<m_iNumOptionRows; l++ )
|
||||||
if( m_OptionRow[l].bOneChoiceForAllPlayers )
|
if( m_OptionRow[l].bOneChoiceForAllPlayers )
|
||||||
m_iSelectedOption[PLAYER_2][l] = m_iSelectedOption[PLAYER_1][l];
|
m_iSelectedOption[PLAYER_2][l] = m_iSelectedOption[PLAYER_1][l];
|
||||||
|
|
||||||
CHECKPOINT;
|
|
||||||
|
|
||||||
|
|
||||||
int p;
|
int p;
|
||||||
@@ -106,8 +102,6 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi
|
|||||||
m_framePage.AddChild( &m_Highlight[p] );
|
m_framePage.AddChild( &m_Highlight[p] );
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKPOINT;
|
|
||||||
|
|
||||||
// init underlines
|
// init underlines
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
@@ -124,8 +118,6 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKPOINT;
|
|
||||||
|
|
||||||
// init m_textItems from optionLines
|
// init m_textItems from optionLines
|
||||||
int r;
|
int r;
|
||||||
for( r=0; r<m_iNumOptionRows; r++ ) // foreach line
|
for( r=0; r<m_iNumOptionRows; r++ ) // foreach line
|
||||||
@@ -196,10 +188,8 @@ void ScreenOptions::Init( InputMode im, OptionRow OptionRows[], int iNumOptionLi
|
|||||||
m_framePage.AddChild( textItems[c] );
|
m_framePage.AddChild( textItems[c] );
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKPOINT;
|
|
||||||
InitOptionsText();
|
InitOptionsText();
|
||||||
|
|
||||||
CHECKPOINT;
|
|
||||||
// TRICKY: Add one more item. This will be "EXIT"
|
// TRICKY: Add one more item. This will be "EXIT"
|
||||||
{
|
{
|
||||||
BitmapText *bt = new BitmapText;
|
BitmapText *bt = new BitmapText;
|
||||||
|
|||||||
Reference in New Issue
Block a user