fix crash

add comment
This commit is contained in:
Glenn Maynard
2003-05-28 03:33:46 +00:00
parent 2d9aeb4701
commit 57cf60a79f
+6 -1
View File
@@ -95,8 +95,11 @@ ScreenHowToPlay::~ScreenHowToPlay()
void ScreenHowToPlay::Update( float fDelta ) void ScreenHowToPlay::Update( float fDelta )
{ {
m_fFakeSecondsIntoSong += fDelta; if(GAMESTATE->m_pCurSong != NULL)
{
GAMESTATE->UpdateSongPosition( m_fFakeSecondsIntoSong ); GAMESTATE->UpdateSongPosition( m_fFakeSecondsIntoSong );
m_fFakeSecondsIntoSong += fDelta;
}
ScreenAttract::Update( fDelta ); ScreenAttract::Update( fDelta );
} }
@@ -106,6 +109,8 @@ void ScreenHowToPlay::HandleScreenMessage( const ScreenMessage SM )
switch( SM ) switch( SM )
{ {
case SM_BeginFadingOut: case SM_BeginFadingOut:
/* We can't do this in ScreenHowToPlay::~ScreenHowToPlay, since that happens
* after the ctor of the next screen; we don't want to mess with its state. */
GAMESTATE->m_pCurSong = NULL; GAMESTATE->m_pCurSong = NULL;
break; break;
} }