fix crash going from gameplay to how to play with delayed screen loads off
This commit is contained in:
@@ -1146,8 +1146,15 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
else
|
||||
Screen::Update( fDeltaTime );
|
||||
|
||||
/* This happens if ScreenDemonstration::HandleScreenMessage sets a new screen when
|
||||
* PREFSMAN->m_bDelayedScreenLoad. */
|
||||
if( GAMESTATE->m_pCurSong == NULL )
|
||||
return;
|
||||
/* This can happen if ScreenDemonstration::HandleScreenMessage sets a new screen when
|
||||
* !PREFSMAN->m_bDelayedScreenLoad. (The new screen was loaded when we called Screen::Update,
|
||||
* and the ctor might set a new GAMESTATE->m_pCurSong, so the above check can fail.) */
|
||||
if( SCREENMAN->GetTopScreen() != this )
|
||||
return;
|
||||
|
||||
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID )
|
||||
m_MaxCombo.SetText( ssprintf("%d", g_CurStageStats.iMaxCombo[GAMESTATE->m_MasterPlayerNumber]) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
||||
|
||||
Reference in New Issue
Block a user