Fix a crash with SDemo by using the current style if it is set.

This commit is contained in:
Steve Checkoway
2007-04-01 12:05:20 +00:00
parent 33e69bc576
commit dfe930eea9
+3 -1
View File
@@ -585,7 +585,9 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse()
const Style *pStyle = vpStyles[0];
st = pStyle->m_StepsType;
}
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), st );
const Style *pStyle = GAMESTATE->m_pCurStyle;
if( pStyle == NULL )
pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), st );
iNumStagesOfThisSong = GameState::GetNumStagesForSongAndStyleType( GAMESTATE->m_pCurSong, pStyle->m_StyleType );
}
else if( GAMESTATE->m_pCurCourse )