[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:
AJ Kelly
2010-05-13 23:02:39 -05:00
parent ec06d16403
commit 199ed3d130
+4 -4
View File
@@ -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 );
} }