diff --git a/stepmania/src/PaneDisplay.cpp b/stepmania/src/PaneDisplay.cpp index c16ee254c7..3cdff322c0 100644 --- a/stepmania/src/PaneDisplay.cpp +++ b/stepmania/src/PaneDisplay.cpp @@ -174,6 +174,7 @@ void PaneDisplay::SetContent( PaneContents c ) const Steps *pSteps = GAMESTATE->m_pCurNotes[m_PlayerNumber]; StepsType st = GAMESTATE->GetCurrentStyleDef()->m_StepsType; const Course *pCourse = GAMESTATE->m_pCurCourse; + Profile *pProfile = PROFILEMAN->GetProfile(m_PlayerNumber); float val = 0; CString str; @@ -195,16 +196,18 @@ void PaneDisplay::SetContent( PaneContents c ) case SONG_DIFFICULTY_RADAR_FREEZE: val = fRadarValues[RADAR_FREEZE]; break; case SONG_DIFFICULTY_RADAR_CHAOS: val = fRadarValues[RADAR_CHAOS]; break; case SONG_PROFILE_HIGH_SCORE: - val = 100.0f * PROFILEMAN->GetProfile(m_PlayerNumber)->GetStepsHighScoreList(pSteps).GetTopScore().fPercentDP; + if( pProfile ) + val = 100.0f * pProfile->GetStepsHighScoreList(pSteps).GetTopScore().fPercentDP; break; case SONG_PROFILE_NUM_PLAYS: - val = (float) PROFILEMAN->GetProfile(m_PlayerNumber)->GetStepsNumTimesPlayed(pSteps); + if( pProfile ) + val = (float) pProfile->GetStepsNumTimesPlayed(pSteps); break; case SONG_MACHINE_HIGH_NAME: /* set val for color */ case SONG_MACHINE_HIGH_SCORE: CHECKPOINT; - val = 100.0f * PROFILEMAN->GetProfile(PROFILE_SLOT_MACHINE)->GetStepsHighScoreList(pSteps).GetTopScore().fPercentDP; + val = 100.0f * PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(pSteps).GetTopScore().fPercentDP; break; case SONG_MACHINE_RANK: @@ -241,10 +244,12 @@ void PaneDisplay::SetContent( PaneContents c ) break; case COURSE_PROFILE_HIGH_SCORE: - val = 100.0f * PROFILEMAN->GetProfile(m_PlayerNumber)->GetCourseHighScoreList(pCourse,st).GetTopScore().fPercentDP; + if( pProfile ) + val = 100.0f * pProfile->GetCourseHighScoreList(pCourse,st).GetTopScore().fPercentDP; break; case COURSE_PROFILE_NUM_PLAYS: - val = (float) PROFILEMAN->GetProfile(m_PlayerNumber)->GetCourseNumTimesPlayed( pCourse ); + if( pProfile ) + val = (float) pProfile->GetCourseNumTimesPlayed( pCourse ); break; case COURSE_PROFILE_RANK: