From e0e6cb31595f0e0c81f664e7bd750923d908de5c Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Tue, 30 Mar 2004 09:30:30 +0000 Subject: [PATCH] fix crash --- stepmania/src/ScreenGameplay.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index a64b202b40..bb2064dc81 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1029,6 +1029,7 @@ void ScreenGameplay::LoadNextSong() m_MarqueeLightsNoteData.Init(); m_BassLightsNoteData.Init(); StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; + ASSERT( GAMESTATE->m_pCurSong ); Steps* pStepsEasy = GAMESTATE->m_pCurSong->GetStepsByDifficulty( st, DIFFICULTY_EASY, false ); Steps* pStepsMedium = GAMESTATE->m_pCurSong->GetStepsByDifficulty( st, DIFFICULTY_MEDIUM, false ); if( pStepsEasy ) pStepsEasy->GetNoteData( &m_BassLightsNoteData ); @@ -1416,9 +1417,13 @@ void ScreenGameplay::Update( float fDeltaTime ) m_meterSongPosition.SetPercent( fPercentPositionSong ); //NSMAN Update Life in NSMAN. - for (int i=0;im_playerLife[i] = int(m_pLifeMeter[i]->GetLife()*10000); - + { + FOREACH_EnabledPlayer( pn ) + { + ASSERT( m_pLifeMeter[pn] ); + NSMAN->m_playerLife[pn] = int(m_pLifeMeter[pn]->GetLife()*10000); + } + } } /* Set g_CurStageStats.bFailed for failed players. In, FAIL_ARCADE, send