"this will always succeed" might not: mapOldStepsToStepsID only contains

steps for pSong (fixes some crashes after reverting in course mode and
then going on to eval)
This commit is contained in:
Glenn Maynard
2004-08-30 22:14:25 +00:00
parent b6c039cac3
commit d9792f2b31
+6 -3
View File
@@ -735,9 +735,12 @@ void SongManager::RevertFromDisk( Song *pSong, bool bAllowNotesLoss )
#define CONVERT_STEPS_POINTER( pSteps ) { \
StepsID id = mapOldStepsToStepsID[pSteps]; /* this will always succeed */ \
pSteps = id.ToSteps( pSong, bAllowNotesLoss ); }
if( pSteps != NULL ) { \
map<Steps*,StepsID>::iterator it = mapOldStepsToStepsID.find(pSteps); \
if( it != mapOldStepsToStepsID.end() ) \
pSteps = it->second.ToSteps( pSong, bAllowNotesLoss ); \
} \
}
FOREACH_PlayerNumber( p )