fix crash on exiting editor

clean up invalidation of Song and Courses
This commit is contained in:
Chris Danford
2004-08-12 04:49:15 +00:00
parent cbe80105fb
commit 873c148f0e
7 changed files with 35 additions and 22 deletions
+2
View File
@@ -1337,9 +1337,11 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM )
case SM_GoToNextScreen:
// Reload song from disk to discard changes.
SONGMAN->RevertFromDisk( GAMESTATE->m_pCurSong, true );
/* We might do something with m_pSteps (eg. UpdateTextInfo) before we end up
* in ScreenEditMenu, and m_pSteps might be invalid due to RevertFromDisk. */
m_pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
SCREENMAN->SetNewScreen( "ScreenEditMenu" );
break;
case SM_BackFromMainMenu: