"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:
@@ -735,9 +735,12 @@ void SongManager::RevertFromDisk( Song *pSong, bool bAllowNotesLoss )
|
|||||||
|
|
||||||
|
|
||||||
#define CONVERT_STEPS_POINTER( pSteps ) { \
|
#define CONVERT_STEPS_POINTER( pSteps ) { \
|
||||||
StepsID id = mapOldStepsToStepsID[pSteps]; /* this will always succeed */ \
|
if( pSteps != NULL ) { \
|
||||||
pSteps = id.ToSteps( pSong, bAllowNotesLoss ); }
|
map<Steps*,StepsID>::iterator it = mapOldStepsToStepsID.find(pSteps); \
|
||||||
|
if( it != mapOldStepsToStepsID.end() ) \
|
||||||
|
pSteps = it->second.ToSteps( pSong, bAllowNotesLoss ); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FOREACH_PlayerNumber( p )
|
FOREACH_PlayerNumber( p )
|
||||||
|
|||||||
Reference in New Issue
Block a user