fix crash if m_MasterPlayerNumber is Invalid

This commit is contained in:
Glenn Maynard
2008-07-01 23:53:53 +00:00
parent e813fa88bc
commit aca8629e5a
+3 -1
View File
@@ -613,7 +613,9 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
const Style *pStyle = m_pCurStyle;
if( pStyle == NULL )
{
const Steps *pSteps = m_pCurSteps[m_MasterPlayerNumber];
const Steps *pSteps = NULL;
if( m_MasterPlayerNumber != PlayerNumber_Invalid )
pSteps = m_pCurSteps[m_MasterPlayerNumber];
if( pSteps )
{
/* If a style isn't set, use the style of the selected steps. */