From aca8629e5a7d4be9deb44a26ee78a07aba008673 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 1 Jul 2008 23:53:53 +0000 Subject: [PATCH] fix crash if m_MasterPlayerNumber is Invalid --- stepmania/src/GameState.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 73537be301..6981812fdb 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -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. */