[ScreenSelectMaster] Fix a crash ("the" crash, really) concerning cursors. Turns out cursors AREN'T always made for players. Only set to invisible if the cursor exists.
This commit is contained in:
@@ -261,7 +261,7 @@ void ScreenSelectMaster::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_mapCurrentChoiceToNextChoiceB[dir][c] = c + add;
|
m_mapCurrentChoiceToNextChoiceB[dir][c] = c + add;
|
||||||
/* Always wrap around MenuDir_Auto. */
|
// Always wrap around MenuDir_Auto.
|
||||||
if( dir == MenuDir_Auto || (bool)WRAP_CURSOR )
|
if( dir == MenuDir_Auto || (bool)WRAP_CURSOR )
|
||||||
wrap( m_mapCurrentChoiceToNextChoiceB[dir][c], m_aGameCommandsB.size() );
|
wrap( m_mapCurrentChoiceToNextChoiceB[dir][c], m_aGameCommandsB.size() );
|
||||||
else
|
else
|
||||||
@@ -391,11 +391,11 @@ void ScreenSelectMaster::BeginScreen()
|
|||||||
{
|
{
|
||||||
if( GAMESTATE->IsHumanPlayer(pn) )
|
if( GAMESTATE->IsHumanPlayer(pn) )
|
||||||
continue;
|
continue;
|
||||||
/*
|
|
||||||
XXX: this code causes crashes
|
|
||||||
if( SHOW_CURSOR )
|
if( SHOW_CURSOR )
|
||||||
|
{
|
||||||
|
if(m_sprCursor[pn])
|
||||||
m_sprCursor[pn]->SetVisible( false );
|
m_sprCursor[pn]->SetVisible( false );
|
||||||
*/
|
}
|
||||||
if( SHOW_SCROLLER )
|
if( SHOW_SCROLLER )
|
||||||
m_Scroller[pn].SetVisible( false );
|
m_Scroller[pn].SetVisible( false );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user